summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-02ci: fuzz: skip fuzz data that contains `import` (#3214)Mohammed Al Sahaf
Thus far the fuzzers have found a few crashers in the Caddyfile parser. However, the fuzzer have been stuck at import glob expansion after import glob expansion, which aren't reproducible.
2020-04-02caddytls: Encode big.Int as string with JSONMatthew Holt
2020-04-02Update readmeMatthew Holt
2020-04-01Fix for last commitMatthew Holt
2020-04-01caddytls: Refactor certificate selection policies (close #1575)Matthew Holt
Certificate selection used to be a module, but this seems unnecessary, especially since the built-in CustomSelectionPolicy allows quite complex selection logic on a number of fields in certs. If we need to extend that logic, we can, but I don't think there are SO many possibilities that we need modules. This update also allows certificate selection to choose between multiple matching certs based on client compatibility and makes a number of other improvements in the default cert selection logic, both here and in the latest CertMagic. The hardest part of this was the conn policy consolidation logic (Caddyfile only, of course). We have to merge connection policies that we can easily combine, because if two certs are manually loaded in a Caddyfile site block, that produces two connection policies, and each cert is tagged with a different tag, meaning only the first would ever be selected. So given the same matchers, we can merge the two, but this required improving the Tag selection logic to support multiple tags to choose from, hence "tags" changed to "any_tag" or "all_tags" (but we use any_tag in our Caddyfile logic). Combining conn policies with conflicting settings is impossible, so that should return an error if two policies with the exact same matchers have non-empty settings that are not the same (the one exception being any_tag which we can merge because the logic for them is to OR them). It was a bit complicated. It seems to work in numerous tests I've conducted, but we'll see how it pans out in the release candidates.
2020-04-01caddyfile: Export NewTestDispenser() (close #2930)Matthew Holt
This allows modules to test their UnmarshalCaddyfile methods.
2020-04-01go.mod: Update smallstep/truststoreMatthew Holt
So that installation continues if Firefox is not installed See https://github.com/smallstep/truststore/issues/3
2020-04-01gzip: Use klauspost/gzip, an optimized gzip implementationMatthew Holt
2020-04-01caddytls: Update cipher suite names and curve namesMatthew Holt
Now using IANA-compliant names and Go 1.14's CipherSuites() function so we don't have to maintain our own mapping of currently-secure cipher suites.
2020-04-01caddyhttp: Print actual listener address in log message (closes #2992)Matthew Holt
Needed if port is 0, thus chosen by OS
2020-04-01caddyhttp: Update host matcher docs about wildcardsMatthew Holt
2020-04-01caddyhttp: 'not' matcher now accepts multiple matcher sets and OR's them (#3208)Matt Holt
See https://caddy.community/t/v2-matcher-or-in-not/7355/
2020-04-01rewrite: Fix for rewrites with URI placeholders (#3209)Matthew Holt
If a placeholder in the path component injects a query string such as the {http.request.uri} placeholder is wont to do, we need to separate it out from the path.
2020-03-31caddytls: Add support for externalAccountBinding ACME extensionMatthew Holt
2020-03-31pki: Add trust subcommand to install root cert (closes #3204)Matthew Holt
2020-03-30httpcaddyfile: Include non-standard ports when mapping logger namesMatthew Holt
If a site block has a key like "http://localhost:2016", then the log for that site must be mapped to "localhost:2016" and not just "localhost" because "localhost:2016" will be the value of the Host header of requests. But a key like "localhost:80" does not include the port since the Host header will not include ":80" because it is a standard port. Fixes https://caddy.community/t/v2-common-log-format-not-working/7352?u=matt
2020-03-30caddyhttp: Rename MatchNegate type to MatchNot typeMatthew Holt
This is more congruent with its module name. A change that affects only code, not configurations.
2020-03-30headers: Trim any trailing colon from field names as a courtesyMatthew Holt
2020-03-30Keep type information with placeholders until replacements happenMatthew Holt
2020-03-29caddyfile: Minor fixes to the formatterMatthew Holt
2020-03-28httpcaddyfile: Put root directive first, before redir and rewriteMatthew Holt
See https://caddy.community/t/v2-match-any-path-but-files/7326/8?u=matt If rewrites (or redirects, for that matter) match on file existence, the file matcher would need to know the root of the site. Making this change implies that root directives that depend on rewritten URIs will not work as expected. However, I think this is very uncommon, and am not sure I have ever seen that. Usually, dynamic roots are based on host, not paths or query strings. I suspect that rewrites based on file existence will be more common than roots based on rewritten URIs, so I am moving root to be the first in the list. Users can always override this ordering with the 'order' global option.
2020-03-27reverse_proxy: Upstream.String() method returns either LookupSRV or DialMatthew Holt
Either Dial or LookupSRV will be set, but if we rely on Dial always being set, we could run into bugs. Note: Health checks don't support SRV upstreams.
2020-03-27caddyauth: Add Metadata field to caddyauth.User (#3174)Robin Lambertz
* caddyauth: Add Metadata field to caddyauth.User * Apply gofmt * Tidy it up a bit Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-03-26ci: fuzz: remove fuzzing trigger on PR (#3195)Mohammed Al Sahaf
2020-03-26ci: fuzz: switch engine from libfuzzer to native go-fuzz (#3194)Mohammed Al Sahaf
2020-03-26caddytls: Remove ManageSyncMatthew Holt
This seems unnecessary for now and we can always add it in later if people have a good reason to need it.
2020-03-26caddytls: Match automation policies by wildcard subjects tooMatthew Holt
https://caddy.community/t/wildcard-snis-not-being-matched/7271/24?u=matt Also use new CertMagic function for matching wildcard names
2020-03-25caddytls: Support placeholders in key_type (#3176)Pascal
* tls: Support placeholders in key_type * caddytls: Simplify placeholder support for ap.KeyType Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-03-25caddyfile: Formatter enhancementsMatthew Holt
2020-03-25ci: exclude integration tests for now (#3188)Mark Sargent
A workaround for inconsistent results on Windows
2020-03-24Merge branch 'v2' of https://github.com/caddyserver/caddyMatthew Holt
2020-03-24ci: preliminary CD with goreleaser (#3173)Mohammed Al Sahaf
* chore: ci: preliminary CD support * chore: ci: split release process into its own workflow * chore: ci: cleanup the ci.yml and .goreleaser.yml * chore: ci: unshallowify the clone before searching for the closes tag * chore: tidy up goreleaser config & the release githubaction * chore: add --no-tty to gpg args * chore: more gpg args * chore: try with default gpg args by goreleaser * chore: gpg... * chore: set GPG_TTY * chore: preset gpg conf * Apply suggestions from code review chore: tidy up the .goreleaser.yml Co-Authored-By: Dave Henderson <dhenderson@gmail.com> * chore: gpg debugging * chore: set and export the tty for gpg * chore: gpg.. * chore: use the exact same line from goreleaser-action README for singing * chore: remove signing stanzas from ymls * chore: clean up the release action for final submission * quote the arguments of echo Co-Authored-By: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Dave Henderson <dhenderson@gmail.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2020-03-24file_server: Fix dumb error check I must have written at 1amMatthew Holt
2020-03-24caddyhttp: Specify default access log for a server (fix #3185)Matthew Holt
2020-03-24reverse_proxy: Add support for SRV backends (#3180)Matt Holt
* reverse_proxy: Begin SRV lookup support (WIP) * reverse_proxy: Finish adding support for SRV-based backends (#3179)
2020-03-24admin: Fix regex for removing @id fields (closes #3187)Matthew Holt
2020-03-24Remove some non-essential plugins from this repo (#2780)Matthew Holt
Brotli encoder, jsonc and json5 config adapters, and the unfinished HTTP cache handler are removed. They will be available in separate repos.
2020-03-24fastcgi: Add debug log (#3178)Matthew Holt
2020-03-24logging: Fix off-by-one for roll size MB from CaddyfileMatthew Holt
"10mb" now results in 10, rather than 9.
2020-03-23report error on failed location response (#3184)Mark Sargent
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-03-23fastcgi: Ensure root is always absolute (issue #3178) (#3182)Matt Holt
2020-03-23fastcgi: Fix PATH_INFO (issue #3178)Matthew Holt
2020-03-23cmd: Ensure certmagic defaults are set for any and all subcommandsMatthew Holt
This is really crucial and I'm surprised no one reported a problem yet
2020-03-23Update readmeMatthew Holt
2020-03-23ci: Update branches to master (#3177)Francis Lavoie
* Update ci.yml * Update fuzzing.yml
2020-03-23tls: Few minor improvements/simplificationsMatthew Holt
2020-03-23caddyhttp: Always provision ACME issuers (fix terms agree error)Matthew Holt
2020-03-23httpcaddyfile: Allow php_fastcgi to be used in route directiveMatthew Holt
Fixes https://caddy.community/t/v2-help-to-set-up-a-yourls-instance/7260/22
2020-03-22httpcaddyfile: Fix little typo (Next -> NextArg)Matthew Holt
2020-03-22cmd: Add --watch flag to start & run commands (closes #1806)Matthew Holt
Because, just for fun.