Repository navigation
fix(proxy): handle trusted TLS termination without redirect loops - #90
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e875efd to
520d5f4
Compare
🐳 RentnerProxy PR PreviewA test-only image for this pull request has been published successfully. Images
Image digest: Tested and built merge commit: Pull request head commit: For reproducible testing and bug reports, prefer
|
Summary
Fix Force HTTPS loops when a configured TLS terminator forwards HTTP to RentnerProxy. The new, empty-by-default
RENTNERPROXY_PROXY_TRUSTED_PROXY_CIDRSaccepts narrow canonical IPv4/IPv6 networks. Only the direct socket peer and exactly oneX-Forwarded-Proto: httpsvalue authorize the HTTPS path; upstream scheme headers are sanitized.Retain 308 redirects, public HTTPS ports, methods and URIs, add
Cache-Control: no-store, and keep ACME challenge routing first. Existing access-policy and Basic Auth checks remain enforced. Data-plane trust is separate from management-web trust. Caddy previews and production configuration use the same typed settings.Related issue
Closes #79
Type of change
Testing
bun run check: 752 web tests and 160 Rust tests passed; format, lint, types, migration validation and production builds passed.bun run certificates:smoke: 44 checks passed, including a real TLS-terminating Caddy front proxy over HTTP/1.1 and HTTP/2, IPv4/IPv6 trusted peers, duplicate/comma/forged headers, method/path preservation, and ACME priority.bun run production:smoke: 29 assertions passed, including Alpha 1 upgrade and restore recovery.bun run proxy:smoke: 36 checks passed.bun run upstream-tls:smoke: 11 checks passed.Checklist
Breaking changes
None. Trusted forwarding remains disabled unless explicitly configured. Invalid trust configurations fail startup.
Screenshots
None; no UI changes.