feat: integrate Caddy as default SSL terminator & reverse proxy (#1012)#1014
Open
gildesmarais wants to merge 3 commits into
Open
feat: integrate Caddy as default SSL terminator & reverse proxy (#1012)#1014gildesmarais wants to merge 3 commits into
gildesmarais wants to merge 3 commits into
Conversation
- Add caddy:2-alpine service to docker-compose.quickstart.yml listening
on https://localhost:4000 using Caddy's local CA
- Add caddy:2-alpine service to docker-compose.yml listening on ports 80/443
with automatic HTTPS via Let's Encrypt for production
- Remove direct host port mappings from html2rss-web in both compose files
- Sanitize X-Forwarded-For and X-Real-IP headers using {client_ip} placeholder
to prevent rate-limit bypass via IP spoofing
- Disable Caddy admin API by default (admin off) to reduce attack surface
- Support CADDY_GLOBAL_OPTIONS env var for CDN/load-balancer trusted_proxies config
- Update bin/quickstart-verify to assert port mapping on caddy service
Closes #1012
7eae13d to
fd933d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1012
Integrates Caddy as the built-in SSL/TLS terminator and reverse proxy in both compose files. The stack now works out-of-the-box over HTTPS with no extra setup.
Changes
docker-compose.quickstart.yml: Addedcaddy:2-alpineservice onhttps://localhost:4000(Caddy's local CA). Removed direct ports fromhtml2rss-web.docker-compose.yml: Addedcaddy:2-alpineon ports 80/443 with automatic Let's Encrypt for production. Removed direct ports fromhtml2rss-web.bin/quickstart-verify: Updated contract assertions to check port mapping on thecaddyservice.Security
X-Forwarded-ForandX-Real-IPheaders are sanitized using Caddy's{client_ip}placeholder, preventing IP-spoofing rate-limit bypasses.admin off).CADDY_GLOBAL_OPTIONSenv var supported for CDN/load-balancer operators to configuretrusted_proxieswithout modifying compose files.Verification
bin/quickstart-verifypasses ✅make readypasses (252 examples, 0 failures) ✅curl -k -I https://localhost:4000/api/v1/healthreturnedHTTP/2 401 via Caddy✅