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

Not setting headers on Koa2 / Node 6.2 #18

Closed
KingScooty opened this issue May 30, 2016 · 6 comments · Fixed by #87
Closed

Not setting headers on Koa2 / Node 6.2 #18

KingScooty opened this issue May 30, 2016 · 6 comments · Fixed by #87

Comments

@KingScooty
Copy link

The headers don't seem to be getting set on the latest version of Koa 2 with node 6.2. Any ideas?

@tsvetann
Copy link

same issue here

@dead-horse
Copy link
Member

can you give a simple code(server and client) to reproduce the issue?

@tsvetann
Copy link

Using koa2!

On server:

const cors = require('kcors')
app.use(convert(cors()))

On Client (origin different than server):
make ajax request with content-type: 'application/json'

leecade added a commit to leecade/cors that referenced this issue Jul 6, 2016
@jakewmeyer
Copy link

This is still an issue, still waiting on the PR to be merged

@garretttaco
Copy link

Still seeing this as an issue as well. The PR above does not seem to fix it, however. As referenced in the PR, it is setting the allowed origin to the origin of the responding server.

CleberRossi added a commit to CleberRossi/cors that referenced this issue Oct 4, 2022
…- Not setting headers on Koa2 / Node 6.2

As Origin header is not set in all fetch. I understand that we need to be able to validade, even if the origin is not present. We are still following https://fetch.spec.whatwg.org/#http-origin but grating headers to be added to response on user needs
@CleberRossi
Copy link
Contributor

This is still an issue, still waiting on the PR to be merged

I just opened a PR. Hope it is still in time :)

@fengmk2 fengmk2 closed this as completed in 2e8da5b Oct 5, 2022
fengmk2 pushed a commit that referenced this issue Oct 8, 2022
As Origin header is not set in all fetch. I understand that we need to be able to validade, even if the origin is not present. We are still following https://fetch.spec.whatwg.org/#http-origin but grating headers to be added to response on user needs

Fix #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants