-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis #8152
Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis #8152
Conversation
… sometimes interfere with apis
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -19,6 +19,7 @@ The following parameters are used: | |||
|method |HTTP method (eg "GET", "POST") | | |||
|body |String data to be sent with the request | | |||
|binary |<<.from-version "5.3.1">> Set to "yes" to cause the response body to be treated as binary data and returned in base64 format | | |||
|defaultHeaders |<<.from-version "5.3.4">> Defaults to true. Set to "false" to prevent default headers from being added. This can be helpful when dealing with apis that restrict header fields. | |
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.
I put in the <<.from-version "5.3.4">>
as a rough guess. Let me know if it needs to change.
Thanks @mklauber and apologies for the delay. |
Hi @mklauber I've reverted this PR because of an error reported by @pmario – the client-server edition fails to start. As well as fixing the problem, I think it would be better to rename the parameter/variable to "useDefaultHeaders". |
Understood. I'll look into that error, and also update that variable. |
New PR up here. #8225 |
Thanks @mklauber |
Extraneous headers can interfere with CORS validation when hitting external APIs, due to tightly configured
Access-Control-Allow-Headers
headers. Add a way to disable these headers when they are causing issues.