fix: remove invalid trusted_proxies structure causing 500 error on proxy host save
Remove handler-level `trusted_proxies` configuration from ReverseProxyHandler that was
using an invalid object structure. Caddy's reverse_proxy handler expects trusted_proxies
to be an array of CIDR strings, not an object with {source, ranges}.
The server-level trusted_proxies configuration in config.go already provides equivalent
IP spoofing protection globally for all routes, making the handler-level setting redundant.
Changes:
- backend: Remove lines 184-189 from internal/caddy/types.go
- backend: Update 3 unit tests to remove handler-level trusted_proxies assertions
- docs: Document fix in CHANGELOG.md
Fixes: #[issue-number] (500 error when saving proxy hosts)
Tests: All 84 backend tests pass (84.6% coverage)
Security: Trivy + govulncheck clean, no vulnerabilities
This commit is contained in:
@@ -1432,6 +1432,7 @@ Cache-Control: no-cache, no-store, must-revalidate, private
|
||||
- Strict CSP (`default-src 'none'`)
|
||||
- All cross-origin headers set to `same-origin`
|
||||
- No unsafe directives
|
||||
|
||||
1. Save
|
||||
2. Test API endpoints (should work—APIs don't need CSP for HTML)
|
||||
3. Assign to API proxy host
|
||||
|
||||
Reference in New Issue
Block a user