Skip to content

fix: Redact Authorization bearer token in debug logs#1280

Open
takanabe wants to merge 1 commit intomainfrom
fix-debug-log
Open

fix: Redact Authorization bearer token in debug logs#1280
takanabe wants to merge 1 commit intomainfrom
fix-debug-log

Conversation

@takanabe
Copy link
Copy Markdown
Contributor

Added _sanitize_headers() function to redact sensitive Authorization bearer tokens when logging HTTP requests in debug mode. The token value is replaced with [REDACTED] while preserving the "Bearer " prefix.

We can use HTTP library for this but this needs library version upgrade. This is the most simplest way to work with small number of code.

Added _sanitize_headers() function to redact sensitive Authorization
bearer tokens when logging HTTP requests in debug mode. The token value
is replaced with [REDACTED] while preserving the "Bearer " prefix.

We can use HTTP library for this but this needs library version upgrade.
This is the most simplest way to work with small number of code.
@takanabe takanabe requested a review from Konboi April 16, 2026 20:54
@takanabe takanabe changed the base branch from main to v1 April 20, 2026 17:42
@takanabe takanabe changed the base branch from v1 to main April 20, 2026 17:44
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.

2 participants