Skip to content

proxy: redact request header values in debug logs - #1769

Open
omrzk wants to merge 1 commit into
cloudflare:masterfrom
omrzk:fix/redact-debug-request-headers
Open

omrzk wants to merge 1 commit into
cloudflare:masterfrom
omrzk:fix/redact-debug-request-headers

Conversation

@omrzk

@omrzk omrzk commented Oct 17, 2026

Copy link
Copy Markdown

Summary

Debug request logging currently serializes every HTTP header value, including credentials in headers such as Authorization and Cookie. This change logs a redacted copy of the headers, retaining header names and value counts. The request sent to the origin is unchanged.

The regression test checks the structured debug entry and verifies that the original request headers remain intact.

Fixes #1372.

Checks

  • CGO_ENABLED=0 go test -mod=readonly ./proxy — passed
  • CGO_ENABLED=0 golangci-lint run ./proxy — passed
  • Full make test lint could not complete locally: an unrelated ingress/TestFunnelIdleTimeout test stalled waiting for ICMP on this macOS host. Repository-wide lint also reports four findings in unchanged files (carrier/websocket_test.go and cmd/cloudflared/tunnel/cmd.go).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡cloudflared tunnel - do not log sensitive headers

1 participant