Hide Authorization header for syncthing

Add rest endpoint for syncthing
This commit is contained in:
Eric Nemchik 2023-02-12 20:56:37 -06:00
parent 0eb569982b
commit de4f1ccfbe
2 changed files with 25 additions and 0 deletions

View file

@ -42,5 +42,17 @@ server {
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_hide_header Authorization;
}
location ~ (/syncthing)?/rest {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app syncthing;
set $upstream_port 8384;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_hide_header Authorization;
}
}

View file

@ -28,4 +28,17 @@ location ^~ /syncthing/ {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /syncthing(.*) $1 break;
proxy_hide_header Authorization;
}
location ^~ /syncthing/rest {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app syncthing;
set $upstream_port 8384;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /syncthing(.*) $1 break;
proxy_hide_header Authorization;
}