dd86171d67
headers: Support deleting all headers as first op ( #5464 )
...
* Delete all existing fields when fieldName is `*`
* Rearrange deletion before addition in headers
* Revert "Rearrange deletion before addition in headers"
This reverts commit 1b50eeeccc92ccd660c7896d8283c7d9e5d1fcb0.
* Treat deleting all headers as a special case
* 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 >
2023-03-27 21:05:18 +00:00
f5a13a4ab4
replacer: Add HTTP time format ( #5458 )
2023-03-27 20:51:13 +00:00
10b265d252
reverseproxy: Header up/down support for CLI command ( #5460 )
2023-03-27 20:35:31 +00:00
05e9974570
caddyhttp: Determine real client IP if trusted proxies configured ( #5104 )
...
* 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-27 20:22:59 +00:00
330be2d8c7
httpcaddyfile: Adjust path matcher sorting to solve for specificity ( #5462 )
2023-03-27 15:43:44 -04:00
0cc49c053f
caddytls: Zero out throttle window first ( #5443 )
...
* caddytls: Zero out throttle window first
* Don't error for on-demand
Fixes b97c76fb47
---------
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
2023-03-20 12:06:00 -06:00
a7db0cfe55
ci: add --yes
to cosign arguments ( #5440 )
2023-03-17 10:36:59 -06:00
2182270a2c
reverseproxy: Reset Content-Length to prevent FastCGI from hanging ( #5435 )
...
Fixes: https://github.com/caddyserver/caddy/issues/5420
2023-03-16 11:42:16 -06:00
a7af7c486e
caddytls: Allow on-demand w/o ask for internal-only
2023-03-14 10:29:27 -06:00
b97c76fb47
caddytls: Require 'ask' endpoint for on-demand TLS
2023-03-14 10:02:44 -06:00
6cc3cbbc69
fileserver: New file browse template ( #5427 )
...
* fileserver: New file browse template
* Redo extension/icon logic; minor color tweaks
* Fine-tune image display
2023-03-10 18:19:31 +00:00
9e943319b4
go.mod: Upgrade dependencies
2023-03-09 10:33:25 -07:00
b420561737
tracing: Support autoprop from OTEL_PROPAGATORS ( #5147 )
...
Co-authored-by: Matt Holt <mholt@users.noreply.github.com >
2023-03-09 09:02:35 -07:00
c05e3898b9
caddyhttp: Enable 0-RTT QUIC ( #5425 )
2023-03-09 08:58:31 -07:00
b3f0cea2c3
encode: flush status code when hijacked. ( #5419 )
2023-03-06 09:13:48 -07:00
94d41a9d86
fileserver: Remove trailing slash on fs filenames ( #5417 )
2023-03-03 14:45:17 -07:00
99d47050e9
core: Eliminate unnecessary shutdown delay on Unix ( #5413 )
...
* core: Eliminate unnecessary shutdown delay on Unix
Fix #5393 , alternate to #5405
* Comments, cleanup, adjust logs
* Fix build constraint
2023-03-03 04:00:18 +00:00
85375861f6
caddyhttp: Fix vars_regexp
matcher with placeholders ( #5408 )
...
Changed to match the `vars` matcher's logic for handling placeholders
2023-03-02 09:01:54 -07:00
f6bab8ba85
context: Rename func to AppIfConfigured
( #5397 )
2023-02-27 18:58:27 +00:00
941eae5f61
reverseproxy: allow specifying ip version for dynamic a
upstream ( #5401 )
...
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
2023-02-27 17:23:09 +00:00
096971e313
ci/cd: ship tarballs with vendored deps ( #5403 )
2023-02-26 22:06:15 +00:00
f3379f650a
caddyfile: Fix heredoc fuzz crasher, drop trailing newline ( #5404 )
...
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com >
2023-02-26 16:56:48 -05:00
960150bb03
caddyfile: Implement heredoc support ( #5385 )
2023-02-26 00:34:27 +00:00
9e6919550b
cmd: Expand cobra support, add short flags ( #5379 )
...
* cmd: Expand cobra support
* Convert commands to cobra, add short flags
* Fix version command typo
Co-authored-by: Emily Lange <git@indeednotjames.com >
* Apply suggestions from code review
Co-authored-by: Matt Holt <mholt@users.noreply.github.com >
---------
Co-authored-by: Emily Lange <git@indeednotjames.com >
Co-authored-by: Matt Holt <mholt@users.noreply.github.com >
2023-02-24 16:09:12 -07:00
167981d258
ci: Update minimum Go version to 1.19
2023-02-24 13:45:44 -07:00
8cb1bb4af3
go.mod: Upgrade quic-go to v0.33.0 (Go 1.19 min)
2023-02-24 13:35:56 -07:00
e3909cc385
reverseproxy: refactor HTTP transport layer ( #5369 )
...
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
Co-authored-by: Weidi Deng <weidi_deng@icloud.com >
2023-02-24 19:54:04 +00:00
be53e432fc
caddytls: Relax the warning for on-demand ( #5384 )
2023-02-22 11:41:01 -07:00
79de6df93d
cmd: Strict unmarshal for validate ( #5383 )
2023-02-22 11:39:40 -07:00
8bc05e598d
caddyfile: Implement variadics for import args placeholders ( #5249 )
...
* 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-16 17:08:36 -07:00
bf54892a73
cmd: make caddy fmt
hints more clear ( #5378 )
2023-02-16 16:34:12 -07:00
5ded580444
cmd: Adjust documentation for commands ( #5377 )
2023-02-16 09:14:07 -07:00
0db29e2ce9
go.mod: Upgrade acmez and x/net
...
x/net 0.7.0 contains a security patch apparently.
v2.6.4
2023-02-14 12:08:31 -07:00
4b119a475f
reverseproxy: Don't buffer chunked requests ( fix #5366 ) ( #5367 )
...
* reverseproxy: Don't buffer chunked requests (fix #5366 )
Mostly reverts 845bc4d50b437995d574819850206e4b3db4040d (#5289 )
Adds warning for unsafe config.
Deprecates unsafe properties in favor of simpler, safer designed ones.
* Update modules/caddyhttp/reverseproxy/caddyfile.go
Co-authored-by: Y.Horie <u5.horie@gmail.com >
* Update modules/caddyhttp/reverseproxy/reverseproxy.go
Co-authored-by: Y.Horie <u5.horie@gmail.com >
* Update modules/caddyhttp/reverseproxy/reverseproxy.go
Co-authored-by: Y.Horie <u5.horie@gmail.com >
* Remove unused code
---------
Co-authored-by: Y.Horie <u5.horie@gmail.com >
2023-02-11 17:25:29 -07:00
90798f3eea
go.mod: Upgrade various dependencies ( #5362 )
...
* chore: Upgrade various dependencies
* Support CEL file matcher with no args
* Document `http.request.orig_uri.path.*`, reorder placeholders in docs
---------
Co-authored-by: Matt Holt <mholt@users.noreply.github.com >
v2.6.3
2023-02-08 17:49:17 +00:00
536c28d4dc
core: Support Windows absolute paths for UDS proxy upstreams ( #5114 )
...
* added some tests for parseUpstreamDialAddress
Test 4 fails because it produces "[[::1]]:80" instead of "[::1]:80"
* support absolute windows path in unix reverse proxy address
* make IsUnixNetwork public, support +h2c and reuse it
* add new tests
2023-02-08 10:05:09 -07:00
c77a6bea66
reverseproxy: Log status code and byte count for websockets ( #5140 )
...
* log response size for websocket request
* record size when using hijack bufio.Writer
2023-02-06 16:14:59 -07:00
12bcbe2c49
caddyhttp: Pluggable trusted proxy IP range sources ( #5328 )
...
* caddyhttp: Pluggable trusted proxy IP range sources
* Add request to the IPRangeSource interface
2023-02-06 12:44:11 -07:00
f6f1d8fc89
Run go.mod tidy
2023-02-06 12:24:01 -07:00
8d3a1b8bcb
caddyauth: Use singleflight for basic auth ( #5344 )
...
* caddyauth: Add singleflight for basic auth
* Fixes #5338
* it occurred the thunder herd problem like this https://medium.com/@mhrlife/avoid-duplicate-requests-while-filling-cache-98c687879f59
* Update modules/caddyhttp/caddyauth/basicauth.go
Fix comment
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
---------
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
Co-authored-by: Matt Holt <mholt@users.noreply.github.com >
2023-02-06 18:29:03 +00:00
ac83b7e218
admin: Add CADDY_ADMIN
env var to override the default ( #5332 )
2023-02-06 17:55:16 +00:00
e62b5fb586
chore: Build with Go 1.20, keep minimum at 1.18 for now ( #5353 )
2023-02-06 11:29:20 -05:00
94b8d56096
cmd: Add --envfile
flag to validate
command ( #5350 )
...
Fixes https://github.com/caddyserver/caddy/issues/5346
2023-01-31 16:27:35 -05:00
8c0b49bf03
cmd: fmt
exit successfully after overwriting config file ( #5351 )
...
Fixes https://github.com/caddyserver/caddy/issues/5349
2023-01-31 11:24:44 -05:00
201b9b41f9
chore: Fix warning "range variable captured by func literal" ( #5348 )
2023-01-31 03:07:57 -05:00
0a3efd1641
caddytls: Debug log for ask endpoint
2023-01-30 09:30:53 -07:00
d73660f7c3
httpcaddyfile: Add persist_config global option ( #5339 )
...
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
2023-01-27 23:31:37 -05:00
7f2a93e6c3
caddyfile: Allow overriding server names ( #5323 )
2023-01-27 14:56:39 -05:00
e9d95ab29f
reverseproxy: Add flag to short command to disable redirects ( #5330 )
...
Co-authored-by: Francis Lavoie <lavofr@gmail.com >
Fixes undefined
2023-01-25 09:40:08 -05:00
962310204f
tracing: Support placeholders in span name ( #5329 )
...
Fixes https://github.com/caddyserver/caddy/issues/5171
2023-01-25 02:26:44 -05:00