feat(nginx): 丰富代理参数并支持自定义配置

- 在 office 代理配置中添加了自定义文件 proxy_params_file.conf 的包含
- 更新了 proxy_params.conf,增加了多个新的代理头参数,包括:
  - X-Forwarded-Proto 使用变量 $the_scheme - X-Real-PORT - Scheme
  - Server-Protocol
  - Server-Name - Server-Addr
  - Server-Port
This commit is contained in:
jmal 2025-06-27 19:43:27 +08:00
parent bff83c936d
commit 3ee4a1ef2f
2 changed files with 8 additions and 1 deletions

View File

@ -172,6 +172,7 @@ http {
proxy_pass http://office/;
include /etc/nginx/conf/proxy_params.conf;
proxy_set_header X-Forwarded-Host $the_host/office;
include /etc/nginx/conf/proxy_params_file.conf;
}
location /drawio/webapp/ {

View File

@ -5,6 +5,12 @@ proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;