diff --git a/syncthing.subdomain.conf.sample b/syncthing.subdomain.conf.sample index c03e7d1..64edc7b 100644 --- a/syncthing.subdomain.conf.sample +++ b/syncthing.subdomain.conf.sample @@ -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; } } diff --git a/syncthing.subfolder.conf.sample b/syncthing.subfolder.conf.sample index be5a72f..741eed3 100644 --- a/syncthing.subfolder.conf.sample +++ b/syncthing.subfolder.conf.sample @@ -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; }