Jira 创建项目抛出 'Error creating project, XSRF check failed'

Jira Creating Project Throws 'Error creating project, XSRF check failed'

我正在尝试在 AWS 上的 ubuntu 服务器盒上获取 Jira 运行 的副本。我配置了 Tomcat,可以在 http://example.com:8080/jira 成功访问我的站点并开始设置过程。我可以创建用户名,但是当指示创建第一个项目时,我在尝试保存时收到以下错误:

创建项目投掷'Error creating project, XSRF check failed'

与此处记录的错误相同:

https://confluence.atlassian.com/jirakb/creating-project-throws-error-creating-project-xsrf-check-failed-397083076.html

Atlassian 自己以及此处:

https://answers.atlassian.com/questions/283780/looking-for-the-full-list-of-http-headers

一些论坛用户。这两种情况都表明 header 被阻止,第二个 link 很好地列出了每个 header:

X-AREQUESTID
X-ASESSIONID
X-AUSERNAME
X-SITEMESH-OFF
X-Atlassian-Token
X-Requested-With

Do not forget to allow GET (of course), POST (of course) but also PUT http methods

我面临的问题是我一直无法找出我的 ubuntu 服务器是如何阻止那些 header 的。我是 运行 nginx,如果有帮助,我会很乐意 post 我的配置。否则所有配置都在 tomcat 中完成。

我在某处得到一个提示,UFW 可能阻止了他们,但那似乎不是 运行。有谁知道我将如何解锁这些 header 以解决我的 Jira 错误?

UFW 根本不会给你这个错误。 UFW 仅运行到第 4 层(TCP/UDP),而不是 HTTP 层,您得到的响应是应用程序层,这意味着所有较低层都成功通信。

如果您是 运行 通过 nginx 的代理,请确保您已启用 proxy_pass_request_headers。

location / {
  proxy_pass                      http://example.com;
  proxy_set_header                Host http://example.com;
  proxy_pass_request_headers      on;
}

查看:Setup Guide

You can only configure JIRA to respond to a single URL and this setting must match the URL that your users request for accessing your JIRA site. You cannot (for example) have a different hostname or URL for internal and external users. Any mismatch between this Base URL setting and the URL requested by your JIRA users will cause problems with dashboard gadgets.

XSRF 通常是主机名配置错误,您可能需要检查配置的基础 url。