Skip to content

WebDAV MOVE Fails: NPM Auto-Added Host Header Overrides Custom Config #4799

@shadowmimosa

Description

@shadowmimosa

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions