Repository navigation
Make SSL inherit the bound address - #305
Roy-Orbison wants to merge 1 commit into
Conversation
a0c1f05 to
a1ff398
Compare
Rather than having two independently-resolved default addresses, the http.ssl.address inherits the host from http.address. Signed-off-by: Roy Orbitson <Roy-Orbison@users.noreply.github.com>
a1ff398 to
b8a5fed
Compare
|
Hey @Roy-Orbison 👋🏻 |
|
It solves double-specification, so config would be DRY. No one who specified something like http:
address: '[2001:db8:c0ff:ee:1:2:3:4]:80'
ssl:
address: ':443'would reasonably expect the server to be listening on a single IPv6 for insecure connections (which browsers' won't even use by default, these days) but only on IPv4 The security of the wildcard address is irrelevant to this issue because the behaviour also exists when a specific IP is configured, and if the wildcard is insecure, why is it used by default, as above? Furthermore, |
Rather than having two independently-resolved default addresses, the
http.ssl.addressinherits the host fromhttp.address.Reason for This PR
When using conf of full, explicit address in
http.address(e.g.[::]:80for dual-stack) but only a port forhttp.ssl.address(e.g.:443), the SSL address to bind is implied by the config hierarchy but is currently not inherited, which is unintuitive. It results in bound addresses looking like this (fromss -plnt):When last I looked, the config docs read:
# Default: ":443"but now contain an explicit host. This could be reverted for simplicity.
Description of Changes
Preprocess the SSL address directive to inherit the host part from the parent, but respect any explicit address in the SSL value, and retain the default IPv4-only of the parent (e.g. both directives are colon & port only). I didn't make any docs changes as they're contingent on interest in this change, and
CHANGELOG.mdseems to be only for released changes.License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
git commit -s).CHANGELOG.md.