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

Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis #8152

Merged

Conversation

mklauber
Copy link
Contributor

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.

Copy link

vercel bot commented Apr 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Apr 16, 2024 5:50pm

@@ -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. |
Copy link
Contributor Author

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.

@Jermolene
Copy link
Owner

Thanks @mklauber and apologies for the delay.

@Jermolene Jermolene merged commit 6910be7 into Jermolene:master May 29, 2024
4 checks passed
Jermolene added a commit that referenced this pull request May 29, 2024
…that can sometimes interfere with apis (#8152)"

This reverts commit 6910be7.
@Jermolene
Copy link
Owner

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".

@mklauber
Copy link
Contributor Author

Understood. I'll look into that error, and also update that variable.

@mklauber
Copy link
Contributor Author

New PR up here. #8225

@Jermolene
Copy link
Owner

Thanks @mklauber

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.

None yet

2 participants