Set Destination header for webdav in nginx proxy

This commit is contained in:
Johannes Zellner
2016-06-01 18:49:50 +02:00
parent 71b5cc4702
commit 47978436c2

View File

@@ -38,6 +38,13 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# http://serverfault.com/questions/121766/webdav-rename-fails-on-an-apache-mod-dav-install-behind-nginx
set $destination $http_destination;
if ($destination ~* ^https(.+)$) {
set $destination http$1;
}
proxy_set_header Destination $destination;
# only serve up the status page if we get proxy gateway errors
error_page 502 503 504 @appstatus;
location @appstatus {