caddy/modules/caddyhttp
Matthew Holt 97ed9e111d
httpcaddyfile: Add nil check to prevent panic, fix validation logic
Panic would happen if an automation policy was specified in a singular
server block that had no hostnames in its address. Definitely an edge
case.

Fixed a bug related to checking for server blocks with a host-less key
that tried to make an automation policy. Previously if you had only two
server blocks like ":443" and another one at ":80", the one at ":443"
could not create a TLS automation policy because it thought it would
interfere with TLS automation for the block at ":80", but obviously that
key doesn't enable TLS because it is on the HTTP port. So now we are a
little smarter and count only non-HTTP-empty-hostname keys.

Also fixed a bug so that a key like "https://:1234" is sure to have TLS
enabled by giving it a TLS connection policy. (Relaxed conditions
slightly; the previous conditions were too strict, requiring there to be
a TLS conn policy already or a default SNI to be non-empty.)

Also clarified a comment thanks to feedback from @Mohammed90
2020-04-24 20:57:51 -06:00
..
caddyauth httpcaddyfile: Don't lowercase placeholder contents (fixes #3264) 2020-04-14 16:11:46 -06:00
encode gzip: Use klauspost/gzip, an optimized gzip implementation 2020-04-01 14:09:57 -06:00
fileserver caddyhttp: Add nil check (fixes #3248 and fixes #3250) 2020-04-10 08:12:42 -06:00
headers
requestbody
reverseproxy reverseproxy: Don't forget to provision embedded headers handler 2020-04-22 19:57:06 -06:00
rewrite rewrite: Fix for rewrites with URI placeholders (#3209) 2020-04-01 00:43:40 -06:00
standard
templates chore: make the linter happier (#3245) 2020-04-08 15:31:51 -06:00
app.go core: Don't return error on RegisterModule() and RegisterAdapter() 2020-04-13 09:48:54 -06:00
autohttps.go httpcaddyfile: Add nil check to prevent panic, fix validation logic 2020-04-24 20:57:51 -06:00
caddyhttp.go caddyhttp: Fix trailers when recording responses (fixes #3236) 2020-04-22 11:10:13 -06:00
celmatcher.go Fix some godocs 2020-04-11 09:01:40 -06:00
errors.go
marshalers.go
matchers.go docs: Clarify "not" matcher structure (see #3233) 2020-04-06 18:44:12 -06:00
matchers_test.go caddyhttp: 'not' matcher now accepts multiple matcher sets and OR's them (#3208) 2020-04-01 10:58:29 -06:00
replacer.go chore: make the linter happier (#3245) 2020-04-08 15:31:51 -06:00
replacer_test.go
responsewriter.go caddyhttp: Fix trailers when recording responses (fixes #3236) 2020-04-22 11:10:13 -06:00
routes.go chore: make the linter happier (#3245) 2020-04-08 15:31:51 -06:00
server.go caddyhttp: Fix common_log format's user ID placeholder (#3300) 2020-04-22 09:05:26 -06:00
staticerror.go Fix some godocs 2020-04-11 09:01:40 -06:00
staticresp.go
staticresp_test.go
subroute.go
vars.go