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

  CREATED BY JENKINSBOT

Requests to the local network are not allowed

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

在添加 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」即可。

Url is blocked: Requests to the local network are not allowed

gitlab Import url is blocked: “Requests to the local network are not allowed” (#26845) · Issues · GitLab.org / GitLab · GitLab

在添加 Webhook 地址时,产生类似如下错误提示:

Url is blocked: Requests to the local network are not allowed

原因分析

参考 gitlab Import url is blocked: “Requests to the local network are not allowed” (#26845) 页面;

解决方案

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