We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改示例 原方法
location /admin { proxy_pass http://localhost:81/; } location ~* ^/(static|common|auth|trojan)/ { proxy_pass http://localhost:81; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; }
上面的方法在访问cdn站点时在浏览器开发者界面连对静态资源的请求都没有,不知道是不是proxy_set_header Host $host;没传递到cdn的问题
修改后
location / { proxy_pass http://localhost:<面板端口>/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $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; }
修改后的缺点就是不能指定location的路径,因为(static|common|auth|trojan)这些资源文件的路径是写死了/static /common /auth /trojan,如果修改了location的路径比如/admin,就会请求不到这些资源文件导致白屏。
能力有限只能解决这么多了,如果作者大大可以完善一下这方面的逻辑就更好了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
修改示例
原方法
上面的方法在访问cdn站点时在浏览器开发者界面连对静态资源的请求都没有,不知道是不是proxy_set_header Host $host;没传递到cdn的问题
修改后
修改后的缺点就是不能指定location的路径,因为(static|common|auth|trojan)这些资源文件的路径是写死了/static /common /auth /trojan,如果修改了location的路径比如/admin,就会请求不到这些资源文件导致白屏。
能力有限只能解决这么多了,如果作者大大可以完善一下这方面的逻辑就更好了
The text was updated successfully, but these errors were encountered: