-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker 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
- Create a proxy host pointing to a backend service
- Add a Custom Location with path
/ - In the custom Nginx configuration, add:
proxy_set_header Host $http_host; - Save and reload
- 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 Hostdirective 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)