Browse Source

feat: 修改反向代理默认 Connection 请求头 (#5951)

Refs https://github.com/1Panel-dev/1Panel/issues/5937
pull/5989/head
zhengkunwang 4 months ago committed by GitHub
parent
commit
40f7ef90b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      cmd/server/nginx_conf/proxy.conf
  2. 2
      cmd/server/nginx_conf/website_default.conf

2
cmd/server/nginx_conf/proxy.conf

@ -5,7 +5,7 @@ location ^~ /test {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;

2
cmd/server/nginx_conf/website_default.conf

@ -10,7 +10,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Connection $http_connection;
access_log /www/sites/domain/log/access.log main;

Loading…
Cancel
Save