gpt4 book ai didi

nginx - 使用 Nginx 作为 proxypass 时的 Apache Openmeetings 5​​.0.0-M2 CSRF 攻击

转载 作者:行者123 更新时间:2023-12-01 16:50:28 25 4
gpt4 key购买 nike

当我使用 nginx 时,我在 openmeeting 5.0.0-M2 中登录时收到 400 错误。

我的nginx配置如下:

server {
listen 443 ssl;
ssl on;
ssl_certificate path_to_certificate;
ssl_certificate_key path_to_key;

server_name myservername;

location /openmeetings/ {
proxy_pass http://127.0.0.1:5080/openmeetings/;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer 'http://$host/openmeetings/';
proxy_set_header X-Real-IP $remote_addr;
}

}

我的日志文件:

CsrfPreventionRequestCycleListener:779 [nio-5080-exec-4]ESC[0;39m - Possible CSRF attack, request URL:
http://ocean.paramatrix.com/openmeetings/wicket/bookmarkable/org.apache.openmee
tings.web.pages.HashPage, Origin: https://ocean.paramatrix.com, action: aborted
with error 400 Origin does not correspond to request

虽然这在 Firefox 浏览器上工作正常,但在 Chrome 浏览器上却不行。

有谁知道我还需要做什么配置?如有任何帮助,我们将不胜感激。

最佳答案

尝试将 Referer header 设置为 HTTPS:

 proxy_set_header Referer 'https://$ho....

关于nginx - 使用 Nginx 作为 proxypass 时的 Apache Openmeetings 5​​.0.0-M2 CSRF 攻击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57923135/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com