Strict-Transport-Security when PLAINTEXT_URL is https #19
Loading…
Reference in a new issue
No description provided.
Delete branch "board/980-504af9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When any
PLAINTEXT_URLentry starts withhttps://, every response now carriesStrict-Transport-Security: max-age=31536000, so browsers that have seen the server once keep using HTTPS for it. Without an https address nothing changes.Config::hsts, set inmain.rsfromplaintext_server::https_url, which reads the rawPLAINTEXT_URLbeforeserver_hostdrops the scheme (case-insensitive, any comma-separated entry).PLAINTEXT_URLrow mentions it.Tests:
https_urls(unit, the URL check) andstrict_transport_security(end to end:/health200, an unknown path 404 and an oversized signup 413 carry the header with an https URL and lack it without one).cargo clippy --all-targets -D warningsandcargo test --lockedpass locally.🤖 Generated with Claude Code