-
Notifications
You must be signed in to change notification settings - Fork 53
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
Origin header is missing on request in fetch event #57
Comments
Good call! This looks like a bug |
@jurijzahn8019 thanks for reporting this! If my understanding is correct, browsers set the Origin header to the domain name of the page that's currently loaded and caused the fetch call. Since WinterJS is running outside the browser, there is no domain name that can be placed in the Origin header. However, you can always add the header manually (which is normally impossible in browsers AFAIK) like so: let request = new Request('https://foo.bar');
request.headers.append('Origin', 'https://baz.me'); |
Hi, thanks, what I mean, is that the header is not present in the event request at all. |
Are you referring to |
Yeah, I have used wasmer btw. Maybe this may be the issue. I don't know. |
You're actually right, the origin header does get removed from the request. I'll investigate. |
Hi there,
I have managed to run my js app with winterjs.
I have a csrf Middleware which evaluates request origin header. And I discovered that the header is always undefined.
I added a log statement right away in the event handler to verify it not my request pipeline, and yes header is missing.
Do I miss something?
Thank you in advance and you make a great job!
The text was updated successfully, but these errors were encountered: