aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
AgeCommit message (Collapse)Author
2024-11-05caddytls: Allow disabling storage cleaning, avoids writing two files (#6593)Francis Lavoie
2024-11-05fileserver: Add `file_limit` option for browse (to be experimental) (#6648)Atakan Yenel
* Add file_limit option for file_server browse * Move file_limit inside browse. * add file_server_file_limit caddyfile adapt test.
2024-11-04forwardauth: Skip copying missing response headers (#6608)Francis Lavoie
2024-10-30httpcaddyfile: Fixes for `prefer_wildcard` mode (#6636)Francis Lavoie
* httpcaddyfile: Fixes for prefer_wildcard mode The wildcard hosts need to be collected first, then considered after, because there's no guarantee that all non-wildcards will appear after all wildcards when looping. Also we should not add a domain to Skip if it doesn't qualify for TLS anyway. * Alternate solution by avoiding adding APs altogether if covered by wildcard
2024-10-21chore: fix some function names in comment (#6650)David Wood
2024-10-18metrics: move `metrics` up, outside `servers` (#6606)Mohammed Al Sahaf
* metrics: move `metrics` up, outside `servers` This change moves the metrics configuration from per-server level to a single config knob within the `http` app. Enabling `metrics` in any of the configured servers inside `http` enables metrics for all servers. Fix #6604 Signed-off-by: Mohammed Al Sahaf <[email protected]> * normalize domain name --------- Signed-off-by: Mohammed Al Sahaf <[email protected]>
2024-10-10tests: fix caddyfile adapt warnings (#6619)Mohammed Al Sahaf
Signed-off-by: Mohammed Al Sahaf <[email protected]>
2024-10-07caddytls: Drop `rate_limit` and `burst`, has been deprecated (#6611)Francis Lavoie
2024-10-02metrics: scope metrics to active config, add optional per-host metrics (#6531)v2.9.0-beta.1Mohammed Al Sahaf
* Add per host config * Pass host label when option is enabled * Test per host enabled * metrics: scope metrics per loaded config * doc and linter Signed-off-by: Mohammed Al Sahaf <[email protected]> * inject the custom registry into the admin handler Co-Authored-By: Dave Henderson <[email protected]> * remove `TODO` comment * fixes Signed-off-by: Mohammed Al Sahaf <[email protected]> * refactor to delay metrics admin handler provision Signed-off-by: Mohammed Al Sahaf <[email protected]> --------- Signed-off-by: Mohammed Al Sahaf <[email protected]> Co-authored-by: Hussam Almarzooq <[email protected]> Co-authored-by: Dave Henderson <[email protected]>
2024-10-02caddyhttp: Implement `auto_https prefer_wildcard` option (#6146)Francis Lavoie
* Allow specifying multiple `auto_https` options * Implement `auto_https prefer_wildcard` option * Adapt tests, add mock DNS module for config testing * Rebase fix
2024-09-30core: Implement socket activation listeners (#6573)Aaron Paterson
* caddy adapt for listen_protocols * adapt listen_socket * allow multiple listen sockets for port ranges and readd socket fd listen logic * readd logic to start servers according to listener protocols * gofmt * adapt caddytest * gosec * fmt and rename listen to listenWithSocket * fmt and rename listen to listenWithSocket * more consistent error msg * non unix listenReusableWithSocketFile * remove unused func * doc comment typo * nonosec * commit * doc comments * more doc comments * comment was misleading, cardinality did not change * addressesWithProtocols * update test * fd/ and fdgram/ * rm addr * actually write... * i guess we doin' "skip": now * wrong var in placeholder * wrong var in placeholder II * update param name in comment * dont save nil file pointers * windows * key -> parsedKey * osx * multiple default_bind with protocols * check for h1 and h2 listener netw
2024-08-30fileserver: browse: Configurable default sort (#6502)lollipopkit🏳️‍⚧️
* fileserver: add `sort` options * fix: test * fileserver: check options in `Provison` * fileserver: more obvious err alerts in sort options * fileserver: move `sort` to `browse` --------- Co-authored-by: Matt Holt <[email protected]>
2024-08-22reverseproxy: allow user to define source address (#6504)Mohammed Al Sahaf
* reverseproxy: allow user to define source address Closes #6503 Signed-off-by: Mohammed Al Sahaf <[email protected]> * reverse_proxy: caddyfile support for local_address Signed-off-by: Mohammed Al Sahaf <[email protected]> --------- Signed-off-by: Mohammed Al Sahaf <[email protected]>
2024-08-22caddyhttp: run `error` (msg) through replacer (#6536)Mohammed Al Sahaf
* error: run `error` (msg) through replacer Signed-off-by: Mohammed Al Sahaf <[email protected]> * fix integration test Signed-off-by: Mohammed Al Sahaf <[email protected]> --------- Signed-off-by: Mohammed Al Sahaf <[email protected]>
2024-08-19reverseproxy: Active health checks request body option (#6520)Jesper Brix Rosenkilde
* Add an option to specify the body used for active health checks * Replacer on request body
2024-08-07replacer: `{file.*}` global placeholder strips trailing newline (#6411)Steffen Busch
Co-authored-by: Kanashimia <[email protected]>
2024-08-05browse: Customizable default sort options (#6468)lollipopkit🏳️‍⚧️
* fileserver: add `sort` options * fix: test * fileserver: check options in `Provison` * fileserver: more obvious err alerts in sort options
2024-07-12reverseproxy: Caddyfile support for health_method (#6454)Jesper Brix Rosenkilde
* Add Caddyfile support of setting active health check request method * Add integration test for active health check request method
2024-07-03intercept: fix http.intercept.header.* placeholder (#6429)Kévin Dunglas
2024-06-14caddyfile: Pass blocks to `import` for snippets (#6130)a
* a * a * a * a * a * a
2024-05-30caddyhttp: Fix merging consecutive `client_ip` or `remote_ip` matchers (#6350)v2.8.1Francis Lavoie
2024-05-27acmeserver: Add `sign_with_root` for Caddyfile (#6345)v2.8.0Ranveer Avhad
* Added sign_with_root option available in the Caddyfile * Added tests for sign_with_root to validate the adapted JSON config
2024-05-14caddytest: normalize the JSON config (#6316)Mohammed Al Sahaf
* caddytest: normalize the JSON config
2024-05-13caddyhttp: New experimental handler for intercepting responses (#6232)Kévin Dunglas
* feat: add generic response interceptors * fix: cs * rename intercept * add some docs * @francislavoie review (first round) * Update modules/caddyhttp/intercept/intercept.go Co-authored-by: Francis Lavoie <[email protected]> * shorthands: ir to resp * mark exported symbols as experimental --------- Co-authored-by: Francis Lavoie <[email protected]>
2024-05-11httpcaddyfile: Set challenge ports when http_port or https_port are usedMatthew Holt
2024-05-11logging: Add support for additional logger filters other than hostname (#6082)Aziz Rmadi
Co-authored-by: Francis Lavoie <[email protected]>
2024-05-10Fix typos (#6311)Viktor Szépe
* Fix typos * Revert * Revert to "htlm" * fix indentations
2024-05-01httpcaddyfile: Fix expression matcher shortcut in snippets (#6288)Francis Lavoie
2024-04-24replacer: Implement `file.*` global replacements (#5463)Francis Lavoie
Co-authored-by: Matt Holt <[email protected]> Co-authored-by: Mohammed Al Sahaf <[email protected]>
2024-04-23reverse_proxy: Add grace_period for SRV upstreams to Caddyfile (#6264)Aziz Rmadi
2024-04-18staticresp: Use the evaluated response body for sniffing JSON content-type ↵Mohammed Al Sahaf
(#6249)
2024-04-17caddyfile: Populate regexp matcher names by default (#6145)Francis Lavoie
* caddyfile: Populate regexp matcher names by default * Some lint cleanup that my VSCode complained about * Pass down matcher name through expression matcher * Compat with #6113: fix adapt test, set both styles in replacer
2024-04-16caddyhttp: Support multiple logger names per host (#6088)Francis Lavoie
* caddyhttp: Support multiple logger names per host * Lint * Add adapt test * Implement "string or array" parsing, keep original `logger_names` * Rewrite adapter test to be more representative of the usecase
2024-04-16chore: fix some typos in comments (#6243)coderwander
2024-04-13caddytls: Upgrade ACMEz to v2; support ZeroSSL API; various fixes (#6229)Matt Holt
* WIP: acmez v2, CertMagic, and ZeroSSL issuer upgrades * caddytls: ZeroSSLIssuer now uses ZeroSSL API instead of ACME * Fix go.mod * caddytls: Fix automation related to managers (fix #6060) * Fix typo (appease linter) * Fix HTTP validation with ZeroSSL API
2024-04-13fileserver: read etags from precomputed files (#6222)Aziz Rmadi
2024-04-12reverseproxy: Implement modular CA provider for TLS transport (#6065)Aziz Rmadi
* added new modular ca providers to caddy tls HttpTransport * reverse-proxy, httptransport: added tests and caddyfile support for ca module --------- Co-authored-by: Mohammed Al Sahaf <[email protected]>
2024-03-27caddyhttp: add http.request.local{,.host,.port} placeholder (#6182)Emily
* caddyhttp: add `http.request.local{,.host,.port}` placeholder This is the counterpart of `http.request.remote{,.host,.port}`. `http.request.remote` operates on the remote client's address, while `http.request.local` operates on the address the connection arrived on. Take the following example: - Caddy serving on `203.0.113.1:80` - Client on `203.0.113.2` `http.request.remote.host` would return `203.0.113.2` (client IP) `http.request.local.host` would return `203.0.113.1` (server IP) `http.request.local.port` would return `80` (server port) I find this helpful for debugging setups with multiple servers and/or multiple network paths (multiple IPs, AnyIP, Anycast). Co-authored-by: networkException <[email protected]> * caddyhttp: add unit test for `http.request.local{,.host,.port}` * caddyhttp: add integration test for `http.request.local.port` * caddyhttp: fix `http.request.local.host` placeholder handling with unix sockets The implementation matches the one of `http.request.remote.host` now and returns the unix socket path (just like `http.request.local` already did) instead of an empty string. --------- Co-authored-by: networkException <[email protected]>
2024-03-22rewrite: `uri query` replace operation (#6165)Aziz Rmadi
* Implemented query replace oeration * Modified replace operation to use regexes in caddyfile * Added more tests to uri query operations
2024-03-20reverseproxy: configurable active health_passes and health_fails (#6154)Sam Ottenhoff
* reverseproxy: active health check allows configurable health_passes and health_fails * Need to reset counters after recovery * rename methods to be more clear that these are coming from active health checks * do not export methods
2024-03-06rewrite: Implement `uri query` operations (#6120)Aziz Rmadi
* Implemented basic uri query operations * Added support for query operations block * Applied Replacer on all query keys and values * Implemented rename query key opration * Rewrite struct: Changed QueryOperations field to Query and comments cleanup * Cleaned up comments, changed the order of operations and added more tests * Changed order of fields in queryOps struct to match the operations order
2024-03-05logging: Implement `log_append` handler (#6066)Francis Lavoie
* logging: Implement `extra_log` handler * Rename to `log_append` * Rename `skip_log` to `log_skip` --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-05httpcaddyfile: Allow nameless regexp placeholder shorthand (#6113)Francis Lavoie
Co-authored-by: Matt Holt <[email protected]>
2024-03-05logging: Implement `append` encoder, allow flatter filters config (#6069)Francis Lavoie
* logging: Implement `add` encoder * Allow flatter config structure for `filter` & `add` * Rename to append * govulncheck was unhappy
2024-03-06ci: fix the integration test `TestLeafCertLoaders` (#6149)Mohammed Al Sahaf
2024-03-05caddytls: clientauth: leaf verifier: make trusted leaf certs source ↵Aziz Rmadi
pluggable (#6050) * Made trusted leaf certificates pluggable into the tls.client_auth.leaf module * Added leaf loaders modules: file, folder, pem aand storage * Cleaned implementation of leaf cert loader modules * Added tests for leaf certs file and folder loaders * cmd: fix the output of the `Usage` section (#6138) * core: OnExit hooks (#6128) * core: OnExit callbacks * core: Process-global OnExit callbacks * ci: bump golangci/golangci-lint-action from 3 to 4 (#6141) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added more leaf certificate loaders tests and cleaned up code * Modified leaf cert loaders json field names and cleaned up storage loader comment * Update modules/caddytls/leaffileloader.go * Update LeafStorageLoader certificates field name * Upgraded protobuf version --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mohammed Al Sahaf <[email protected]> Co-authored-by: Matt Holt <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26caddytls: verifier: caddyfile: re-add Caddyfile support (#6127)Mohammed Al Sahaf
* caddytls: verifier: caddyfile: re-add Caddyfile support * appease the linter * caddytls: client_auth: verifier: change namespace to `tls.client_auth.verifier`
2024-02-24acmeserver: add policy field to define allow/deny rules (#5796)Mohammed Al Sahaf
* acmeserver: support specifying the allowed challenge types * add caddyfile adapt tests * acmeserver: add `policy` field to define allow/deny rules * allow `omitempty` to work * add caddyfile support for `policy` * remove "uri domain" policy * fmt the files * add docs * do not support `CommonName`; the field is deprecated * r/DNSDomains/Domains/g * Caddyfile docs * add tests * move `Policy` to top of file
2024-02-21caddytest: Rename adapt tests to `*.caddyfiletest` extension (#6119)Francis Lavoie
2024-02-20tests: uses testing.TB interface for helper to be able to use test server in ↵José Carlos Chávez
benchmarks. (#6103)