caddy/modules/caddyhttp/reverseproxy
Gilbert Gilb's f5c3094050
cmd: prevent commas in header values from being split (#7268)
`pflag.GetStringSlice` treats commas as delimiters, which causes issues
when passing headers whose values contain commas (`X-Robots-Tag:
noindex, nofollow`). These are incorrectly split into multiple headers
and errors out:

- `X-Robots-Tag: noindex`
- ` nofollow`

Switch to `pflag.GetStringArray`, which does not split on commas[1].

Note that this changes behavior for cases where multiple headers were
provided in a single argument with commas (`--header-down "X-Foo:
Bar,X-Bar: Foo"`). Such cases will now be treated as a single header
value. If this breaking change is unacceptable, we will need a smarter
fallback mechanism.

[1] https://github.com/spf13/pflag/pull/90
2025-09-22 21:12:06 -06:00
..
fastcgi Use slices.Contains to simplify code (#7039) 2025-05-31 12:03:06 -06:00
forwardauth forwardauth: Skip copying missing response headers (#6608) 2024-11-04 14:58:53 -07:00
addresses.go core: Implement socket activation listeners (#6573) 2024-09-30 10:55:03 -06:00
addresses_test.go reverseproxy: do not parse upstream address too early if it contains replaceble parts (#5695) 2023-08-05 23:30:02 +02:00
admin.go fix struct names (#6151) 2024-03-06 13:53:03 +00:00
ascii.go reverseproxy: Sync up handleUpgradeResponse with stdlib (#4664) 2022-04-11 12:49:56 -06:00
ascii_test.go filesystem: Globally declared filesystems, fs directive (#5833) 2024-01-13 20:12:43 +00:00
buffering_test.go reverseproxy: more comments about buffering and add new tests (#6778) 2025-03-07 11:22:43 -07:00
caddyfile.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
command.go cmd: prevent commas in header values from being split (#7268) 2025-09-22 21:12:06 -06:00
copyresponse.go reverseproxy: Fix double headers in response handlers (#4847) 2022-06-22 15:10:14 -04:00
healthchecks.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
hosts.go reverseproxy: Add valid Upstream to DialInfo in active health checks (#6949) 2025-04-15 08:44:53 -06:00
httptransport.go reverse_proxy: use the new KeepAliveConfig to set probe interval (#7157) 2025-08-21 14:36:54 -06:00
httptransport_test.go reverseproxy: Implement modular CA provider for TLS transport (#6065) 2024-04-12 07:19:14 -06:00
metrics.go reverseproxy: ignore duplicate collector registration error (#6820) 2025-02-04 10:55:30 +03:00
reverseproxy.go use a more modern writing style to simplify code (#7182) 2025-08-20 11:41:21 -06:00
selectionpolicies.go Use the built-in max/min to simplify the code (#7081) 2025-06-19 16:39:48 -06:00
selectionpolicies_test.go reverseproxy: Allow 0 as weights for weighted_round_robin (#6681) 2024-11-07 17:58:31 -05:00
streaming.go docs: fix some minor issues in the comments (#7101) 2025-06-30 06:50:00 +00:00
streaming_test.go reverseproxy: Add more debug logs (#5793) 2023-10-11 13:36:20 -06:00
upstreams.go perf: use zap's Check() to prevent useless allocs (#6560) 2024-09-13 11:16:37 -06:00
upstreams_test.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00