「GitLab」- Requests to the local network are not allowed

  CREATED BY JENKINSBOT

问题描述

在添加Webhook时,产生了该错误:

	Requests to the local network are not allowed

问题原因

原因在官方「Webhooks and insecure internal web services」文章已经解释,是为了防止内部无认证的服务被恶意请求。

解决方案

如果要解决这个问题,在管理员后台设置即可。以管理员帐号登录:

Admin Area
-> Settings
-> Network
-> Outbound requests
-> Allow requests to the local network from hooks and services

勾选「Allow requests to the local network from hooks and services」即可。

参考文献

gitlab使用webhook向jenkins发送请求,报错 Requests to the local network are not allowed
Webhooks and insecure internal web services