summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-17caddyhttp: Add default SNI tests (#3146)Mark Sargent
* added sni tests * set the default sni when there is no host to match * removed invalid sni test. Disabled tests that rely on host headers. * readded SNI tests. Added logging of config load times
2020-03-17cmd: fmt: Fix brace opening block indentation (#3153)Vaibhav
This fixes indentation for blocks starting with a brace as: ```Caddyfile { ... } ``` Fixes #3144 Signed-off-by: Vaibhav <vrongmeal@gmail.com>
2020-03-16caddyhttp: Support path matcher of "*" without panicMatthew Holt
2020-03-16Use JSON format for logs if not interactive terminalMatthew Holt
2020-03-15Simplify build instructions in readmeMatthew Holt
2020-03-15caddyhttp: Clean up; move some code aroundMatthew Holt
2020-03-15caddyhttp: Add support for listener wrapper modulesMatthew Holt
Wrapping listeners is useful for composing custom behavior related to accepting, closing, reading/writing connections (etc) below the application layer; for example, the PROXY protocol.
2020-03-15caddytls: Clean up some code related to automationMatthew Holt
2020-03-15cmd: fmt: --write -> --overwrite to make it clear it's destructiveMatthew Holt
2020-03-15Add missing license textsMatthew Holt
2020-03-15caddytls: Set Issuer properly on automation policies (fix #3150)Matthew Holt
When using the default automation policy specifically, ap.Issuer would be nil, so we'd end up overwriting the ap.magic.Issuer's default value (after New()) with nil; this instead sets Issuer on the template before New() is called, and no overwriting is done.
2020-03-14fileserver: Add --templates flag to file-server commandMatthew Holt
2020-03-14pki: Don't treat cert installation failure as errorMatthew Holt
See https://caddy.community/t/fail-to-start-caddy2-not-nss-security-databases-found/7223?u=matt
2020-03-13Some hotfixes for beta 16Matthew Holt
2020-03-13Minor tweaksMatthew Holt
2020-03-13caddyhttp: Fix default SNI for default conn policy (#3141)Mark Sargent
* add integration tests * removed SNI test * remove integration test condition * minor edit * fix sni when using static certificates Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-03-13v2: Implement 'pki' app powered by Smallstep for localhost certificates (#3125)Matt Holt
* pki: Initial commit of PKI app (WIP) (see #2502 and #3021) * pki: Ability to use root/intermediates, and sign with root * pki: Fix benign misnamings left over from copy+paste * pki: Only install root if not already trusted * Make HTTPS port the default; all names use auto-HTTPS; bug fixes * Fix build - what happened to our CI tests?? * Fix go.mod
2020-03-11Fix #3130: Crash at fuzzing target replacer (#3133)Bill Glover
* Fix #3130: Crash at fuzzing target replacer * Add additional test case based on fuzzer feedback
2020-03-10httpcaddyfile: error for wrong arg count of admin opt (#3126) (#3131)Francis Lavoie
2020-03-09caddyhttp: New algorithm for auto HTTP->HTTPS redirects (fix #3127) (#3128)Matt Holt
It's still not perfect but I think it should be more correct for slightly more complex configs. Might still fall apart for complex configs that use on-demand TLS or at a large scale (workarounds are to just implement your own redirects, very easy to do anyway).
2020-03-09cmd: Use loadConfig() for validate as run, start, and reload doMatthew Holt
2020-03-08Rework Replacer loop to handle escaped braces (#3121)Bill Glover
Fixes #3116 * Rework Replacer loop to ignore escaped braces * Add benchmark tests for replacer * Optimise handling of escaped braces * Handle escaped closing braces * Remove additional check for closing brace This commit removes the additional check for input in which the closing brace appears before the opening brace. This check has been removed for performance reasons as it is deemed an unlikely edge case. * Check for escaped closing braces in placeholder name
2020-03-08caddytls: customizable client auth modes (#2913)evtr
* ability to specify that client cert must be present in SSL * changed the clientauthtype to string and make room for the values supported by go as in caddy1 * renamed the config parameter according to review comments and added documentation on allowed values * missed a reference * Minor cleanup; docs enhancements Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-03-07http_ntlm: fix panic due to unintialized embedded field (#3120)Mohammed Al Sahaf
2020-03-07tls: Couple of quick fixes for 4d18587192e4fffe5b34b714eaabcfc212914c1eMatthew Holt
2020-03-07tls: Auto-migrate cert assets to new path (details in #3124)Matthew Holt
2020-03-06Merge branch 'certmagic-refactor' into v2Matthew Holt
2020-03-06Refactor for CertMagic v0.10; prepare for PKI appMatthew Holt
This is a breaking change primarily in two areas: - Storage paths for certificates have changed - Slight changes to JSON config parameters Huge improvements in this commit, to be detailed more in the release notes. The upcoming PKI app will be powered by Smallstep libraries.
2020-03-04ci: Optimize published artifacts (#3118)Matt Holt
Build the published executables with CGO disabled, stripped, and with `-trimpath` for more reproducible build
2020-03-04httpcaddyfile: remove certificate tags from global state (#3111)Mark Sargent
* remove the certificate tag tracking from global state * refactored helper state, added log counter * moved state initialisation close to where it is used. * added helper state comment
2020-03-02update quic-go to v0.15.1 (#3109)Marten Seemann
2020-03-01go.mod: update quic-go to v0.15.0 (supporting QUIC draft-27) (#3107)Marten Seemann
2020-02-29fmt: Add support for block nesting. (#3105)Vaibhav
Previously the formatter did not include support for blocks inside other blocks. Hence the formatter could not indent some files properly. This fixes it. Fixes #3104 Signed-off-by: Vaibhav <vrongmeal@gmail.com>
2020-02-29cmd: Add `caddy fmt` command. (#3090)Vaibhav
This takes the config file as input and formats it. Prints the result to stdout. Can write changes to file if `--write` flag is passed. Fixes #3020 Signed-off-by: Vaibhav <vrongmeal@gmail.com>
2020-02-29ci: publish build artifacts (#3103)Mohammed Al Sahaf
* ci: publish build artifacts (per-commit Caddy binaries) * ci: include OS name in artifact name of *nix binaries so they don't overwrite each other
2020-02-28Simplify the logic in the previous commitMatthew Holt
2020-02-28httpcaddyfile: Treat no matchers as 0-len path matchers (fix #3100)Matthew Holt
+ a couple other minor changes from linter
2020-02-28reverse_proxy, php_fastcgi: Fix upstream parsing regression (fix #3101)Matthew Holt
2020-02-27Couple of minor docs tweaksMatthew Holt
2020-02-27httpcaddyfile: Allow "admin off" optionMatthew Holt
2020-02-27Refactor ExtractMatcherSet()Matthew Holt
2020-02-27reverse_proxy: Allow use of URL to specify schemeMatthew Holt
This makes it more convenient to configure quick proxies that use HTTPS but also introduces a lot of logical complexity. We have to do a lot of verification for consistency and errors. Path and query string is not supported (i.e. no rewriting). Scheme and port can be inferred from each other if HTTP(S)/80/443. If omitted, defaults to HTTP. Any explicit transport config must be consistent with the upstream schemes, and the upstream schemes must all match too. But, this change allows a config that used to require this: reverse_proxy example.com:443 { transport http { tls } } to be reduced to this: reverse_proxy https://example.com which is really nice syntactic sugar (and is reminiscent of Caddy 1).
2020-02-27cmd/reverse_proxy: Add --change-host-header flagMatthew Holt
"Transparent mode" is the default, just like the actual handler.
2020-02-27Fix typos (#3087)Success Go
* Fix typo * Fix typo, thanks for Spell Checker under VS Code
2020-02-27Revert "reverse_proxy: Add 'transparent' Caddyfile subdirective (closes #2873)"Matthew Holt
This reverts commit 86b785e51cccd5df18611c380962cbd4faf38af5.
2020-02-27reverse_proxy: Add 'transparent' Caddyfile subdirective (closes #2873)Matthew Holt
2020-02-27It might be HTTP->HTTPS in the comment (#3086)Success Go
2020-02-27Fix spelling error (#3085)Success Go
2020-02-27ci: improve CI flow (#3083)Mohammed Al Sahaf
* ci: update golangci-lint * ci: build Caddy to catch build error * ci: remove GO111MODULE env var * ci: update MacOS image
2020-02-26caddyfile: expand environment variables within caddy files (#3082)Zaq? Wiedmann
Small expansion to the work done in https://github.com/caddyserver/caddy/pull/2963 which simply calls `os.ExpandEnv` so env vars like `{$URL}` where `$URL=$SCHEME://$HOST:$PORT` (contrived) get the expanded $SCHEME, $HOST, and $PORT variables included