【问题标题】:301 Moved Permanently while running Jenkins Build from Slack301 从 Slack 运行 Jenkins Build 时永久移动
【发布时间】:2015-08-12 08:08:58
【问题描述】:

按照this 教程,我想在 Slack 中包含一个斜杠命令,它将远程触发 Jenkins 构建。我的 Jenkins 服务器是使用 ngnix 的反向代理。

所以,https://[Jenkins-Server]/buildByToken/build?job=[job-name]&token=[token] 命令在使用curl 或我的浏览器运行时会触发构建。 curl 输出是

HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 12 Aug 2015 08:51:41 GMT
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 11
Connection: keep-alive
X-Content-Type-Options: nosniff

但是当它通过 Slack 触发时,会给出以下输出。我在集成斜杠命令时嵌入了相同的 URL。

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html> 

我是 slack 的新手,任何帮助将不胜感激。

【问题讨论】:

  • 请检查您的 http 日志以确保您使用的是正确的 Token

标签: nginx jenkins slack-api


【解决方案1】:

在不知道您被重定向到哪里的情况下,很难判断这是正常行为还是不良行为。

例如,您是否被重定向到登录页面?

您是否在反向代理访问日志中查看过您的 Slack 命令实际上调用了哪个 URL?

【讨论】:

    猜你喜欢
    • 2019-11-04
    • 2012-07-10
    • 2020-11-11
    • 2013-09-26
    • 2019-10-14
    • 2018-06-18
    • 2018-06-23
    • 2021-08-13
    • 1970-01-01
    相关资源
    最近更新 更多