mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
a58f240d3e
Guh, this is complicated. Fixes #4640 This also follows up on #4398 (reverting it) which made a change that technically worked, but was incorrect. It changed the condition in `hostsFromKeysNotHTTP` from `&&` to `||`, but then the function no longer did what its name said it would do, and it would return hosts even if they were marked with `http://`, if they used a non-HTTP port. That wasn't the intent of it. The test added in there was kept though, because it is a valid usecase. The actual fix is to check _earlier_ whether all the addresses explicitly have `http://`, and if so we can short circuit and skip considering the rest. |
||
---|---|---|
.. | ||
caddyfile_adapt | ||
testdata | ||
autohttps_test.go | ||
caddyfile_adapt_test.go | ||
caddyfile_test.go | ||
handler_test.go | ||
map_test.go | ||
reverseproxy_test.go | ||
sni_test.go | ||
stream_test.go |