Add Added the option to use different access lists for custom locations#5282
Open
MioOgbeni wants to merge 1 commit intoNginxProxyManager:developfrom
Open
Conversation
|
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.
Summary
This PR adds support for custom access lists (ACLs) per proxy host location, allowing users to override the parent proxy host's ACL for specific locations.
Problem Context
In nginx-proxy-manager v2.3.1 (very old version that we are using now), users could achieve similar functionality through advanced config by pasting ACL rules into location advanced config. However, when we decide to upgrade to newer versions, we noticed that this approach became problematic because:
deny allrule at the enddeny allrule is rendered before any advanced config at location block, making all other ACL rules ineffectiveSolution
Instead of relying on advanced config workarounds, this PR implements a proper UI-driven approach that allows users to:
Changes Made
Backend Changes
Schema Updates:
location_countto access list schema for separate counting of access list usage across custom locations of proxy hostsuse_parent_access_list,access_list_id, andaccess_listpropertiesCore Logic (
backend/internal/):access-list.js: Split ACL counting intoproxy_host_countandlocation_countfor better visibility/auditabilitynginx.js: Fixed ACL rendering logic to properly apply location-specific ACLs with correct precedenceproxy-host.js: Added location normalization and ACL enrichment functionsFrontend Changes
UI Components:
LocationsFields.tsx: Added checkbox to toggle parent ACL inheritance and AccessField dropdown for custom ACL selectionTable.tsx: Added separate "Locations" column showing location-specific ACL usage countsAPI Models:
models.ts: AddedlocationCountproperty to AccessList interfaceTranslations:
API Schema Updates
location_countpropertyTesting
Notes
This is my first contribution to the nginx-proxy-manager project. I'm very open to any criticism and code reviews - please let me know if there are any improvements, bugs, or better approaches to implement this feature. The code has been tested in the development environment and appears to work correctly (at least i hope 🤞), but I'm happy to make any necessary adjustments.