Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

docker(nginx): remove unused $xfp map and use $scheme for X-Forwarded-Proto, simplifying configuration and fixing WebDAV authentication issues

johaven818c8ed5040b
diff --git a/docker/config/nginx/nginx.conf b/docker/config/nginx/nginx.conf
index 070a4a86..022adf8d 100644
--- a/docker/config/nginx/nginx.conf
+++ b/docker/config/nginx/nginx.conf
@@ -1,13 +1,5 @@
# SYNC-IN NGINX VHOST
-map $request_uri $xfp {
- # This header must be null on webdav uri
- # It causes authentication failures with Microsoft-WebDAV-MiniRedir (Windows)
- ~^/webdav(?:/.*)? "";
- default $scheme;
-}
-
-
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
@@ -50,7 +42,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
- proxy_set_header X-Forwarded-Proto $xfp;
+ proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_cache_bypass $http_upgrade;