NginxProxyManager / NginxProxyManager/nginx-proxy-manager
WebDAV MOVE Fails: NPM Auto-Added Host Header Overrides Custom Config
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the generated Nginx configuration for a Custom Location and trace where the automatic proxy_set_header Host $host; directive is added. Reproduce the configuration with proxy_set_header Host $http_host;, then verify that the custom directive is no longer overridden and the configuration still reloads successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100