How to make a GET fetch request with Origin header #209
Replies: 2 comments 3 replies
-
Sorry, it look me a little while to answer this. I believe it is set by the browser itself. If it's not, you can try to set header. It is possible that there may be a mistake in a documentation. If you could test and submit a PR to fix it (if it's there), that would be great. |
Beta Was this translation helpful? Give feedback.
-
No worries, your answer came pretty quickly. In the meantime I found out that the Origin header indeed is set (presumably by the browser). The issue I was facing was a different one (wrong URL) and only accidentally showed up as a response without CORS headers. So all is good ;-) I think the documentation of the The Fetch specification (https://fetch.spec.whatwg.org/#origin-header) defines: "The I suggest to just delete that line in the docs. |
Beta Was this translation helpful? Give feedback.
-
In the docs for
Request::method
is written: "Note that the Origin header is not set on Fetch requests with a method of HEAD or GET.". Now I wonder how to make a GET request which carries anOrigin
header.Beta Was this translation helpful? Give feedback.
All reactions