caddy/caddytest/integration
Matthew Holt b3d35a4995
httpcaddyfile: Don't put localhost in public APs (fix #4220)
If an email is specified in global options, a site called 'localhost' shouldn't be bunched together with public DNS names in the automation policies, which get the default, public-CA issuers. Fix old test that did this.

I also noticed that these two:

    localhost {
    }
    example.com {
    }

and

    localhost, example.com {
    }

produce slightly different TLS automation policies. The former is what the new test case covers, and we have logic that removes the empty automation policy for localhost so that auto-HTTPS can implicitly create one. (We prefer that whenever possible.) But the latter case produces two automation policies, with the second one being for localhost, with an explicit internal issuer. It's not wrong, just more explicit than it needs to be.

I'd really like to completely rewrite the code from scratch that generates automation policies, hopefully there is a simpler, more correct algorithm.
2021-06-25 11:28:32 -06:00
..
caddyfile_adapt httpcaddyfile: Don't put localhost in public APs (fix #4220) 2021-06-25 11:28:32 -06:00
testdata caddyfile: Add args on imports (#3423) 2020-06-01 10:43:06 -06:00
autohttps_test.go caddyhttp: Implement better logic for inserting the HTTP->HTTPS redirs (#4033) 2021-04-19 19:54:12 -06:00
caddyfile_adapt_test.go encode,staticfiles: Content negotiation, precompressed files (#4045) 2021-03-29 18:47:19 -06:00
caddyfile_test.go refactored caddytest helpers (#3285) 2020-04-27 13:23:46 +12:00
handler_test.go browse: align template to struct field renames from 4940325 (#3706) 2020-09-08 10:45:48 -06:00
map_test.go map: Accept regex substitution in outputs (#3991) 2021-03-10 14:22:33 -07:00
reverseproxy_test.go reverseproxy: Fix dial placeholders, SRV, active health checks (#3780) 2020-10-13 10:35:20 -06:00
sni_test.go map: Reimplement; multiple outputs; optimize 2020-10-02 14:23:56 -06:00
stream_test.go reverse_proxy: fix bidirectional streams with encodings (fix #3606) (#3620) 2020-08-03 20:50:38 -06:00