Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support logging Authorization User #254

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Support logging Authorization User #254

merged 1 commit into from
Jan 22, 2024

Conversation

taoso
Copy link
Contributor

@taoso taoso commented Jan 13, 2024

For reqeust with Authorization header or Proxy-Authorization header, the user name is not stored in the URL. So the logger will not output it.

In order to log user name for Authorization, we could update the User filed of http.Request. So the logger should use the latest value.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Go Version Update
  • Dependency Update

Description

Related Tickets & Documents

  • Related Issue #
  • Closes #

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

Run verifications and test

  • make verify is passing
  • make test is passing

For reqeust with Authorization header or Proxy-Authorization header,
the user name is not stored in the URL. So the logger will not output
it.

In order to log user name for Authorization, we could update the User
filed of http.Request. So the logger should use the latest value.
@AlexVulaj AlexVulaj merged commit 9c61bd8 into gorilla:main Jan 22, 2024
9 of 11 checks passed
@taoso taoso deleted the user branch January 22, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants