Repository navigation
feat(panel): add toggle functionality for panel port with recovery co… - #5833
Siumauricio wants to merge 1 commit into
Conversation
| const hostname = requestHost.replace(/:\d+$/, "").toLowerCase(); | ||
| return hostname === panelHost.trim().toLowerCase(); |
There was a problem hiding this comment.
Direct access passes domain check
isRequestFromPanelHost removes the port before comparing hosts, so an admin visiting http://panel.example.com:3000 passes the check without going through Traefik. If the domain route is broken, disabling port 3000 removes their only working connection and leaves them needing the recovery command. Reject direct-port requests before allowing the port to be disabled.
| }); | ||
| } | ||
| } | ||
| await togglePanelPort(input.enable); |
There was a problem hiding this comment.
Clearing the domain removes access
After an admin disables port 3000, clearing the domain removes the panel's last working route. WebDomain allows an empty domain, and assignDomainServer passes it to updateServerTraefik, which deletes the route without restoring port 3000. Make domain removal reject this change or safely restore direct access when the port is disabled.
…mmand
What is this PR about?
Please describe in a short paragraph what this PR is about.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes #123
Screenshots (if applicable)
Fix both ways admins can lose panel access before merging.
Summary
Adds a panel-port toggle to the server actions menu.
Reviews (1) · Last reviewed commit: "feat(panel): add toggle functionality fo..." · Reviewed by Greptile