caddy/modules
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
..
caddyhttp httpcaddyfile: Add nil check to prevent panic, fix validation logic 2020-04-24 20:57:51 -06:00
caddypki pki: Add trust subcommand to install root cert (closes #3204) 2020-03-31 17:56:36 -06:00
caddytls caddytls: Don't initialize default internal issuer unless necessary 2020-04-09 13:09:48 -06:00
filestorage docs: Minor improvements 2020-04-21 19:30:04 -06:00
logging core: Rename ParsedAddress -> NetworkAddress 2020-04-07 08:33:45 -06:00
standard Remove some non-essential plugins from this repo (#2780) 2020-03-24 10:37:47 -06:00