【发布时间】:2020-02-02 18:15:30
【问题描述】:
我们正在尝试设置一个 webhook,以便我们可以使用 https://github.com/blar/blar/settings/hooks 在我们可公开访问的 Jenkins 服务器上触发作业
表单为我们提供了“有效负载 URL”字段,但没有提供额外标题的字段。这意味着我们不能提供 Jenkins crumb 以便请求可以正确地进行身份验证。如果没有带有 crumb 的标头,我们会从 webhook 传递中获得以下响应:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /ghprbhook. Reason:
<pre> No valid crumb was included in the request</pre></p><hr><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
我们如何告诉 github 我们要使用的标头???
【问题讨论】: