feat: fix upstream host resolution edge case and support PEM paste in custom certificates#5348
Open
Eric-Terminal wants to merge 3 commits intoNginxProxyManager:developfrom
Open
feat: fix upstream host resolution edge case and support PEM paste in custom certificates#5348Eric-Terminal wants to merge 3 commits intoNginxProxyManager:developfrom
Eric-Terminal wants to merge 3 commits intoNginxProxyManager:developfrom
Conversation
…mpatibility Files changed: backend/internal/nginx.js. Purpose: provide an optional, NPM-side compatibility path for variable-based proxy_pass upstream resolution without changing existing Nginx templates or default behavior. Implementation: add environment flag NPM_PRE_RESOLVE_UPSTREAM_HOSTS (disabled by default); pre-resolve eligible upstream hostnames via dns.lookup() while generating proxy host and custom location configs; fall back to original hostname when resolution fails. Result: when enabled, setups using docker-compose extra_hosts (for example host.docker.internal) can avoid resolver host-not-found failures; when disabled, behavior remains backward compatible.
Add an Advanced Configuration section describing when to enable NPM_PRE_RESOLVE_UPSTREAM_HOSTS, example compose env usage, fallback behavior on resolution failure, and operational notes about generation-time resolution.
Add optional textarea inputs for certificate, certificate key, and intermediate certificate in CustomCertificateModal. At submit time, pasted PEM values are converted to File objects and uploaded via existing multipart API, so backend routes remain unchanged. Keep file upload path intact and require certificate + certificate key from either file input or pasted text before validation/upload.
|
Docker Image for build 1 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses two issues:
host.docker.internalcannot be resolved whenextra_hostsis used (variableproxy_pass+ resolver path) #53441) Optional upstream pre-resolution for
forward_host(issue #5344)Problem:
Nginx variable-based upstream resolution may fail for hostnames that are only resolvable through container/system resolver paths (for example
extra_hostsmappings likehost.docker.internal).What changed:
NPM_PRE_RESOLVE_UPSTREAM_HOSTS(default: disabled)dns.lookup)forward_hostand custom locationforward_hostBehavior:
2) Allow direct PEM paste in Custom Certificate modal (issue #5347)
Problem:
Custom certificate flow previously required local file selection, which is inconvenient in remote/mobile/thin-client workflows.
What changed:
Fileobjects client-side)validateanduploadmultipart APIs are reused without contract changesBehavior:
Docs
NPM_PRE_RESOLVE_UPSTREAM_HOSTS