[GH-ISSUE #4799] WebDAV MOVE Fails: NPM Auto-Added Host Header Overrides Custom Config #3022

Open
opened 2026-02-26 07:37:36 +03:00 by kerem · 0 comments
Owner

Originally created by @shadowmimosa on GitHub (Oct 14, 2025).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4799

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug

When configuring a Custom Location / with custom proxy_set_header directives, NPM automatically adds proxy_set_header Host $host; which overrides the intended custom setting. This causes issues with services that require the full Host: hostname:port format (e.g., WebDAV services).

Specifically, when adding proxy_set_header Host $http_host; in Custom Location config, NPM still injects proxy_set_header Host $host; after it, making the custom setting ineffective.

To Reproduce

  1. Create a proxy host pointing to a backend service
  2. Add a Custom Location with path /
  3. In the custom Nginx configuration, add: proxy_set_header Host $http_host;
  4. Save and reload
  5. Check the generated Nginx config file - proxy_set_header Host $host; still exists and overrides the custom setting

Expected behavior

Either:

  • The custom proxy_set_header Host directive should not be overridden by auto-generated defaults
  • NPM should detect duplicate directives and use the custom one instead
  • NPM should provide an option to disable auto-injection of certain headers

Operating System

Docker (jc21/nginx-proxy-manager:latest)

Originally created by @shadowmimosa on GitHub (Oct 14, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4799 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** When configuring a Custom Location `/` with custom `proxy_set_header` directives, NPM automatically adds `proxy_set_header Host $host;` which overrides the intended custom setting. This causes issues with services that require the full `Host: hostname:port` format (e.g., WebDAV services). Specifically, when adding `proxy_set_header Host $http_host;` in Custom Location config, NPM still injects `proxy_set_header Host $host;` after it, making the custom setting ineffective. **To Reproduce** 1. Create a proxy host pointing to a backend service 2. Add a Custom Location with path `/` 3. In the custom Nginx configuration, add: `proxy_set_header Host $http_host;` 4. Save and reload 5. Check the generated Nginx config file - `proxy_set_header Host $host;` still exists and overrides the custom setting **Expected behavior** Either: - The custom `proxy_set_header Host` directive should not be overridden by auto-generated defaults - NPM should detect duplicate directives and use the custom one instead - NPM should provide an option to disable auto-injection of certain headers **Operating System** Docker (jc21/nginx-proxy-manager:latest)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3022
No description provided.