Skip to content

Don't log headers#1655

Merged
zachmargolis merged 1 commit intomasterfrom
margolis-dont-log-headers
Aug 31, 2017
Merged

Don't log headers#1655
zachmargolis merged 1 commit intomasterfrom
margolis-dont-log-headers

Conversation

@zachmargolis
Copy link
Contributor

Why:

  1. They were being serialized incorrectly
  2. They could potentially contain sensitive data

before (note the "headers":"#<ActionDispatch::Http::Headers:0x007ff1b05abcd0>")

{"method":"GET","path":"/api/health/workers.json","format":"json","controller":"Health::WorkersController","action":"index","status":200,"duration":504.3,"headers":"#<ActionDispatch::Http::Headers:0x007ff1b05abcd0>","user_id":"anonymous-uuid","user_agent":"curl/7.54.0","ip":"::1","host":"localhost","timestamp":"2017-08-31 14:43:36 -0400","uuid":"c8f71f70-815f-4d42-bed1-44b18104c9f0"}

after

{"method":"GET","path":"/api/health/workers.json","format":"json","controller":"Health::WorkersController","action":"index","status":200,"duration":519.54,"user_id":"anonymous-uuid","user_agent":"curl/7.54.0","ip":"::1","host":"localhost","timestamp":"2017-08-31 14:44:27 -0400","uuid":"9b59e2a8-1ec9-464c-b186-49ce4df7b998"}

**Why**:
1. They were being serialized incorrectly
2. They could potentially contain sensitive data
Copy link
Contributor

@monfresh monfresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zachmargolis zachmargolis merged commit df549cf into master Aug 31, 2017
@zachmargolis zachmargolis deleted the margolis-dont-log-headers branch August 31, 2017 18:57
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