Skip to content

Commit 08b5160

Browse files
authored
Fix host enable/disable functionality - Use NPM native endpoints
- Fixed critical bug where --host-disable showed 'disabled' in UI but sites remained accessible - Replaced generic PUT /api/nginx/proxy-hosts/{id} approach with NPM's dedicated endpoints: • POST /api/nginx/proxy-hosts/{id}/enable for enabling hosts • POST /api/nginx/proxy-hosts/{id}/disable for disabling hosts - Discovered through browser dev tools inspection of NPM web interface requests - Added comprehensive documentation explaining the bug discovery process - Removed debug output messages for cleaner user experience The generic JSON modification approach only updates the UI status but doesn't actually disable network access. NPM's native endpoints properly handle the nginx configuration changes required for actual functionality. Resolves: GitHub issue #18
1 parent 430ede0 commit 08b5160

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

npm-api.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# NPM api https://github.com/NginxProxyManager/nginx-proxy-manager/tree/develop/backend/schema
77
# https://github.com/NginxProxyManager/nginx-proxy-manager/tree/develop/backend/schema/components
88

9-
VERSION="3.0.0"
9+
VERSION="3.0.1"
1010

1111
#################################
1212
# This script allows you to manage Nginx Proxy Manager via the API. It provides

0 commit comments

Comments
 (0)