Repository navigation
Allow custom headers for submit (and fetcher.submit)
#10002
Replies: 12 comments 5 replies
|
I guess the current way to do this would be to use hidden input values? (or query params on get requests) |
|
I wanted to submit a DELETE request with a custom header. It's unfortunate it isn't allowed. |
|
Just stumbled across this today, it makes implementing proper CSRF a pain. Even the OWASP cheatsheet says if possible use a header rather than a form field as it's more secure and only allowed for same-origin requests. @kentcdodds did you find any work around on this or is it still off limits? |
|
Also ran into this, but in a bit of a weird use case. We have an action we're using internally, but also accessible to outside requests via API key. We can't add our auth headers, so we had to dump |
|
Same need for me, to add a Bearer header. |
|
I also need this feature. Please Add it. Thank you |
|
I also need this feature. :-) |
|
Devs please let us know if you plan to implement this feature. Thank you. |
|
Would love to see this too, up |
|
+1 |
|
+1 |
|
Closing in favor of the canonical custom-fetch proposal, being implemented in PR #15586. The proposed This is a global transport hook rather than a new Authored by an AI agent on behalf of @brophdawg11 |
Uh oh!
There was an error while loading. Please reload this page.
That's it. Just let me pass my own headers for stuff that wouldn't work without JavaScript anyway. My specific use case is to force a specific instance of my app to handle a request, but I'm sure there are other use cases too.
All reactions