mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 01:15:51 +03:00
[PR #5282] Add Added the option to use different access lists for custom locations #4144
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#4144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/5282
Author: @MioOgbeni
Created: 2/6/2026
Status: 🔄 Open
Base:
develop← Head:feat/custom-acl-for-custom-locations📝 Commits (1)
21bd677feat: add custom access list option for custom locations📊 Changes
31 files changed (+534 additions, -30 deletions)
View changed files
📝
backend/internal/access-list.js(+100 -17)📝
backend/internal/nginx.js(+13 -3)📝
backend/internal/proxy-host.js(+108 -5)📝
backend/schema/components/access-list-object.json(+6 -1)📝
backend/schema/components/proxy-host-object.json(+20 -0)📝
backend/schema/paths/nginx/access-lists/get.json(+2 -1)📝
backend/schema/paths/nginx/access-lists/listID/get.json(+2 -1)📝
backend/schema/paths/nginx/access-lists/listID/put.json(+1 -0)📝
backend/schema/paths/nginx/access-lists/post.json(+1 -0)📝
frontend/src/api/backend/models.ts(+5 -0)📝
frontend/src/components/Form/LocationsFields.tsx(+43 -2)📝
frontend/src/locale/src/bg.json(+12 -0)📝
frontend/src/locale/src/de.json(+12 -0)📝
frontend/src/locale/src/en.json(+12 -0)📝
frontend/src/locale/src/es.json(+12 -0)📝
frontend/src/locale/src/fr.json(+12 -0)📝
frontend/src/locale/src/ga.json(+12 -0)📝
frontend/src/locale/src/hu.json(+12 -0)📝
frontend/src/locale/src/id.json(+12 -0)📝
frontend/src/locale/src/it.json(+12 -0)...and 11 more files
📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.