-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove every default header except User-Agent
#3644
Conversation
d282657
to
943534a
Compare
Codecov Report
@@ Coverage Diff @@
## master #3644 +/- ##
==========================================
- Coverage 86.26% 83.86% -2.4%
==========================================
Files 739 62 -677
Lines 38341 4693 -33648
Branches 4606 574 -4032
==========================================
- Hits 33075 3936 -29139
+ Misses 4000 636 -3364
+ Partials 1266 121 -1145 |
Thanks for the PR!
If the user provided this header, we shouldn't remove it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @nmuesch said 🙂
🤦♂️ I didn't even think of that... Good point. |
af1a666
to
c923384
Compare
c923384
to
a38df53
Compare
a38df53
to
3c21914
Compare
This does more than what's in the title, for example default headers contain |
include_default_headers
default to false
include_default_headers
default to false
Reverting to the original PR title. Editing the headers instead of removing content in individual checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dabcoder We've decided to not ensure backward compatibility. Please remove every default header except User-Agent
.
User-Agent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
6ad1afe
to
2b06390
Compare
What does this PR do?
GET requests do not need to include'Content-Type'
in headers (some application firewalls may block them), unless users specifically decide to use custom headers that include such'Content-Type'
.The goal of this PR is to provide a ('http_method'
) argument to get different headers depending on the use case (+ ensure backward compatibility).EDIT:
User-Agent
.'Content-Type'
for checks that use other http methods than GET (thehttp_check
only).Motivation
Customer reported issue.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached