如何修复哨兵中缺少的 CSRF 令牌

HFi*_*nch 5 c c++ django sentry

在 openshift 上安装它时与哨兵战斗后,我启动并运行它只是发现当向我的服务器发送事件时它会抛出这个错误:

12:30:59 [警告] django.request: Forbidden (CSRF cookie not set.): /api/1/envelope/ (status_code=403 request=<WSGIRequest: POST u'/api/1/envelope/'>) 10.125.2.1 - - [20/Jul/2020:12:30:59 +0000] "POST /api/1/envelope/HTTP/1.1" 403 6059 "-" "sentry.native/0.3.4"

如果我向 API 发送 curl 请求,我会得到一个显示 csrf 错误的简洁 HTML 网页。有人知道这里可能有什么问题吗?

tem*_*oto 4

哨兵/api/中继工作者的代理。相关部分来自https://github.com/getsentry/onpremise/blob/master/nginx/nginx.conf

upstream relay { server relay:3000; }
upstream sentry { server web:9000; }
server {
    location /api/store/ { proxy_pass http://relay; }
    location ~ ^/api/[1-9]\d*/ { proxy_pass http://relay; }
    location / { proxy_pass http://sentry; }
}
Run Code Online (Sandbox Code Playgroud)