Fix nginx WebDAV URL encoding and HTTP protocol issues
- Change proxy_pass to preserve original request URI for URL encoding - Add HTTP/1.1 and Connection header fixes for copyparty compatibility - Remove path manipulation that broke files with spaces/special characters Fixes HTTP 400 "bad headers" errors when uploading files with spaces in filenames via WebDAV clients like X-plore. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,8 @@ server {
|
||||
# Explicitly allow WebDAV methods
|
||||
limit_except GET POST PUT DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK { deny all; }
|
||||
|
||||
proxy_pass http://127.0.0.1:8082/files$1;
|
||||
# Pass original request URI to preserve URL encoding
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -84,6 +85,10 @@ server {
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
# Critical: Use HTTP/1.1 and fix connection headers
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
# Critical: Disable nginx response modifications
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user