Plain-HTTP requests obey the CONNECT host rules #30

Merged
mikluko merged 1 commit from fix/http-host-rules into main 2026-10-26 20:57:44 +00:00
Owner

Closes #7.

Router.Default forwarded every absolute-URI request without matching its host. A plain-HTTP request now reaches Default only when a CONNECT host pattern matches its host or a Connect fallback is set. Anything else gets 403 Forbidden, from the new router.Forbidden handler.

This breaks library users who set Default with no host rules: they now get a 403 for every host. The changelog says so.

Closes #7. `Router.Default` forwarded every absolute-URI request without matching its host. A plain-HTTP request now reaches `Default` only when a `CONNECT` host pattern matches its host or a `Connect` fallback is set. Anything else gets `403 Forbidden`, from the new `router.Forbidden` handler. This breaks library users who set `Default` with no host rules: they now get a 403 for every host. The changelog says so.
Plain-HTTP requests obey the CONNECT host rules
All checks were successful
CI / changelog (pull_request) Successful in 6s
CI / test (pull_request) Successful in 21s
3af10ef961
Router.Default forwarded every absolute-URI request, so -mitm example.com
alone still proxied plain HTTP to any host.

Closes #7
mikluko deleted branch fix/http-host-rules 2026-10-26 20:57:45 +00:00
Sign in to join this conversation.
No description provided.