summaryrefslogtreecommitdiff
path: root/caddyconfig
AgeCommit message (Collapse)Author
2023-08-14ci: use gci linter (#5708)Jacob Gadikian
* use gofmput to format code * use gci to format imports * reconfigure gci * linter autofixes * rearrange imports a little * export GOOS=windows golangci-lint run ./... --fix
2023-08-07ci: Use gofumpt to format code (#5707)Jacob Gadikian
2023-08-04caddyfile: check that matched key is not a substring of the replacement key ↵WeidiDeng
(#5685)
2023-08-03httpcaddyfile: Fix `string does not match ~[]E` error (#5675)Herman Slatman
Only happens for some people. Unable to confirm.
2023-08-02caddyhttp: Make use of `http.ResponseController` (#5654)Francis Lavoie
* caddyhttp: Make use of http.ResponseController Also syncs the reverseproxy implementation with stdlib's which now uses ResponseController as well https://github.com/golang/go/commit/2449bbb5e614954ce9e99c8a481ea2ee73d72d61 * Enable full-duplex for HTTP/1.1 * Appease linter * Add warning for builds with Go 1.20, so it's less surprising to users * Improved godoc for EnableFullDuplex, copied text from stdlib * Only wrap in encode if not already wrapped
2023-08-02httpcaddyfile: Allow `hostnames` & logger name overrides for log directive ↵Francis Lavoie
(#5643) * httpcaddyfile: Allow `hostnames` override for log directive * Implement access logger name overrides * Fix panic & default logger clobbering edgecase
2023-07-12caddyfile: Fix comparing if two tokens are on the same line (#5626)WeidiDeng
* fix comparing if two tokens are on the same line * compare tokens from copies when importing
2023-06-30caddyconfig: Specify config adapter for HTTP loader (close #5607)Matthew Holt
2023-05-25caddyfile: Track import name instead of modifying filename (#5540)WeidiDeng
* Merge branch 'master' into import_file_stack * remove space in log key
2023-05-22caddyfile: Do not replace import tokens if they are part of a snippet (#5539)WeidiDeng
* fix variadic placeholder in imported file which also imports * fix tests. * skip replacing args when imported token may be part of a snippet
2023-05-17httpcaddyfile: Sort Caddyfile sliceMatthew Holt
Makes list deterministic. See #5538
2023-05-16caddyhttp: Implement named routes, `invoke` directive (#5107)Francis Lavoie
* caddyhttp: Implement named routes, `invoke` directive * gofmt * Add experimental marker * Adjust route compile comments
2023-05-15caddyhttp: Refactor cert Managers (fix #5415) (#5533)Matt Holt
2023-05-13Slightly more helpful error messageMatthew Holt
2023-05-10caddytls: Configurable fallback SNI (#5527)Matt Holt
* Initial implementation of fallback_sni * Apply upstream patch
2023-04-20caddyfile: Stricter parsing, error for brace on new line (#5505)Francis Lavoie
2023-03-27log: Make sink logs encodable (#5441)Mohammed Al Sahaf
* log: make `sink` encodable * deduplicate logger fields * extract common fields into `BaseLog` and embed it into `SinkLog` * amend godoc on `BaseLog` and `SinkLog` * minor style change --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-03-27caddytls: Eval replacer on automation policy subjects (#5459)Francis Lavoie
Also renamed the field to SubjectsRaw, which can be considered a breaking change but I don't expect this to affect much.
2023-03-27caddyhttp: Determine real client IP if trusted proxies configured (#5104)Francis Lavoie
* caddyhttp: Determine real client IP if trusted proxies configured * Support customizing client IP header * Implement client_ip matcher, deprecate remote_ip's forwarded option
2023-03-27httpcaddyfile: Adjust path matcher sorting to solve for specificity (#5462)Francis Lavoie
2023-02-26caddyfile: Fix heredoc fuzz crasher, drop trailing newline (#5404)Francis Lavoie
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2023-02-26caddyfile: Implement heredoc support (#5385)Francis Lavoie
2023-02-16caddyfile: Implement variadics for import args placeholders (#5249)WeidiDeng
* implement variadic placeholders imported snippets reflect actual lines in file * add import directive line number for imported snippets add tests for parsing * add realfile field to help debug import cycle detection. * use file field to reflect import chain * Switch syntax, deprecate old syntax, refactoring - Moved the import args handling to a separate file - Using {args[0:1]} syntax now - Deprecate {args.*} syntax - Use a replacer map for better control over the parsing - Add plenty of warnings when invalid placeholders are detected - Renaming variables, cleanup comments for readability - More tests to cover edgecases I could think of - Minor cleanup to snippet tracking in tokens, drop a redundant boolean field in tokens --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-02-16cmd: make `caddy fmt` hints more clear (#5378)Emily Lange
2023-02-06caddyhttp: Pluggable trusted proxy IP range sources (#5328)Francis Lavoie
* caddyhttp: Pluggable trusted proxy IP range sources * Add request to the IPRangeSource interface
2023-01-27httpcaddyfile: Add persist_config global option (#5339)Y.Horie
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-01-27caddyfile: Allow overriding server names (#5323)Francis Lavoie
2023-01-21cmd: `caddy fmt` return code is 1 if not formatted (#5297)Y.Horie
* cmd: Fix caddy fmt if input isn't formatted * Fixes #5294 * return exit 1 with an error message * cmd: Use formattingDifference for caddy fmt * #5294 * expose caddyfile.formattingDifference
2023-01-21httpcaddyfile: Warn on importing empty file; skip dotfiles (#5320)Y.Horie
* httpcaddyfile: Change the parse rules when empty file or dotfile with a glob. * Fixes #5295 * Empty file should just log a warning, and result in no tokens. * The last segment of the path is '*', it should skip any dotfiles. * The last segment of the path is '.*', it should read all dotfiles in a dir. * httpcaddyfile: Regard empty files as import files which include only white space.
2023-01-18httpcaddyfile: Fix `handle` grouping inside `route` (#5315)WeidiDeng
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-01-17chore: Fix caddyfile.replaceEnvVars return (#5311)Y.Horie
2023-01-10caddyhttp: Add server-level `trusted_proxies` config (#5103)Francis Lavoie
2023-01-06caddytls: Add `dns_ttl` config, improve Caddyfile `tls` options (#5287)Yannick Ihmels
2022-12-06acme_server: Configurable default lifetime for issued certificates (#5232)Kyle McCullough
* acme_server: add certificate lifetime configuration option Signed-off-by: Kyle McCullough <kylemcc@gmail.com> * pki: allow intermediate cert lifetime to be configured Signed-off-by: Kyle McCullough <kylemcc@gmail.com> Signed-off-by: Kyle McCullough <kylemcc@gmail.com>
2022-11-14reverseproxy: Mask the WS close message when we're the client (#5199)Francis Lavoie
* reverseproxy: Mask the WS close message when we're the client * weakrand * Bump golangci-lint version so path ignores work on Windows * gofmt * ugh, gofmt everything, I guess
2022-10-24httploader: Close resp body on bad status codeMatthew Holt
Related to #5158
2022-10-24caddyconfig: Fix httploader leak from unused responses (#5159)Chris Lahaye
fixes #5158 Signed-off-by: Chris Lahaye <mail@chrislahaye.com> Signed-off-by: Chris Lahaye <mail@chrislahaye.com>
2022-10-13httpcaddyfile: Improve detection of indistinguishable TLS automation ↵Matt Holt
policies (#5120) * httpcaddyfile: Skip some logic if auto_https off * Try removing this check altogether... * Refine test timeouts slightly, sigh * caddyhttp: Assume udp for unrecognized network type Seems like the reasonable thing to do if a plugin registers its own network type. * Add comment to document my lack of knowledge * Clean up and prepare to merge Add comments to try to explain what happened
2022-10-12httpcaddyfile: Wrap site block in subroute if host matcher used (#5130)Matt Holt
* httpcaddyfile: Wrap site block in subroute if host matcher used (fix #5124) * Correct boolean logic (oops)
2022-10-06httpcaddyfile: Fix `metrics` global option parsing (#5126)Francis Lavoie
2022-10-05caddyconfig: Implement retries into HTTPLoader (#5077)Cory Cooper
* httploader: Add max_retries * caddyconfig: dependency-free http config loading retries * caddyconfig: support `retry_delay` in http loader * httploader: Implement retries * Apply suggestions from code review Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-10-05logging: Fix `skip_hosts` with wildcards (#5102)Francis Lavoie
Fix #4859
2022-10-04httpcaddyfile: Skip `automate` when `auto_https off` is specified (#5110)Francis Lavoie
2022-09-20httpcaddyfile: Fix `protocols` global option parsing (#5054)Francis Lavoie
* httpcaddyfile: Fix `protocols` global option parsing When checking for a block, the current nesting must be used, otherwise it returns the wrong thing. * Adjust adapt test to cover the broken behaviour that is now fixed * Fix some admin tests which suddenly run even with -short
2022-09-16core: Variadic Context.Logger(); soft deprecationMatthew Holt
Ideally I'd just remove the parameter to caddy.Context.Logger(), but this would break most Caddy plugins. Instead, I'm making it variadic and marking it as partially deprecated. In the future, I might completely remove the parameter once most plugins have updated.
2022-09-16caddyhttp: Support TLS key logging for debugging (#4808)David Manouchehri
* Add SSL key logging. * Resolve merge conflict with master * Add Caddyfile support; various fixes * Also commit go.mod and go.sum, oops * Appease linter * Minor tweaks * Add doc comment Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-16caddyhttp: Make metrics opt-in (#5042)Matt Holt
* caddyhttp: Make metrics opt-in Related to #4644 * Make configurable in Caddyfile
2022-09-15caddyhttp: Add --debug flag to commandsMatthew Holt
file-server and reverse-proxy This might be useful!
2022-09-15Fix #4169 (correct e6c58fd)Matthew Holt
2022-09-15caddyfile: Prevent infinite nesting on fmt (fix #4175)Matthew Holt