summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2020-03-22ci: test local CA and update SNI tests (#3145)Mark Sargent
* run caddy tests in process * call main with run args * exclude tests - windows * include json example * disable caddyfile tests, include json test with non trusted local ca * converted SNI tests to json syntax
2020-03-22httpcaddyfile: Move header before redir (fixes #3148)Matthew Holt
2020-03-22fastcgi: Support multiple path splitters (close #1564)Matthew Holt
2020-03-21ci: Improve build artifact file names (#3168)Francis Lavoie
2020-03-21ci: Use matrix to set per-os variables (#3166)Francis Lavoie
Simplify cross-platform
2020-03-21caddyconfig: register adapters as Caddy modules (#3132)Mohammed Al Sahaf
* admin: Refactor /load endpoint out of caddy package This eliminates the caddy package's dependency on the caddyconfig package, which helps prevent import cycles. * v2: adapter: register config adapters as Caddy modules * v2: adapter: simplify adapter registration as adapters and modules * v2: adapter: let RegisterAdapter be in charge of registering adapters as modules * v2: adapter: remove underscrores placeholders * v2: adapter: explicitly ignore the error of writing response of writing warnings back to client * Implicitly wrap config adapters as modules Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-03-20tls/http: Fix auto-HTTPS logic w/rt default issuers (fixes #3164)Matthew Holt
The comments in the code should explain the new logic thoroughly. The basic problem for the issue was that we were overriding a catch-all automation policy's explicitly-configured issuer with our own, for names that we thought looked like public names. In other words, one could configure an internal issuer for all names, but then our auto HTTPS would create a new policy for public-looking names that uses the default ACME issuer, because we assume public<==>ACME and nonpublic<==>Internal, but that is not always the case. The new logic still assumes nonpublic<==>Internal (on catch-all policies only), but no longer assumes that public-looking names always use an ACME issuer. Also fix a bug where HTTPPort and HTTPSPort from the HTTP app weren't being carried through to ACME issuers properly. It required a bit of refactoring.
2020-03-20caddytls: Support wildcard matching in ServerName conn policy matcherMatthew Holt
2020-03-20httpcaddyfile: Simplify 'root' directive parsingMatthew Holt
I must have written that one before the helper function `RegisterHandlerDirective`.
2020-03-20httpcaddyfile: Append access logger name to log's includes (fix #3110)Matthew Holt
2020-03-20v2: update CI badge on README (#3162)Mohammed Al Sahaf
2020-03-20go.mod: Update some deps; add new Strings lib to CEL matcherMatthew Holt