Merge pull request #286 from Websoft9/zhaojing1987-patch-1

Update initproxy.conf
This commit is contained in:
qiaofeng1227 2023-08-15 11:08:34 +08:00 committed by GitHub
commit d1e9979c7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ server {
rewrite ^/locales/(.*) /portainer/locales/$1 break;
}
location /portainer/ {
location /portainer/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
@ -62,7 +62,7 @@ server {
if ($request_method = OPTIONS) {
return 204;
}
sub_filter '</head>' "<script>var token='$arg_Token';(token)?window.localStorage.setItem('nginx-proxy-manager-tokens', '[{\"t\":\"$arg_Token\",\"n\":\"$arg_Name\"}]'):null;</script></head>";
sub_filter '</head>' "<script>var tokens='$cookie_nginx_tokens';(tokens)?window.localStorage.setItem('nginx-proxy-manager-tokens', '[{\"t\":\"$cookie_nginx_tokens\",\"n\":\"$cookie_nginx_nikeName\"}]'):null;</script></head>";
# source changes
sub_filter 'href="/' 'href="/nginxproxymanager/';
sub_filter 'src="/' 'src="/nginxproxymanager/';
@ -87,4 +87,4 @@ server {
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}
}