cors icon indicating copy to clipboard operation
cors copied to clipboard

Not setting headers on Koa2 / Node 6.2

Open KingScooty opened this issue 9 years ago • 5 comments

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

KingScooty avatar May 30 '16 16:05 KingScooty

same issue here

tsvetann avatar Jun 13 '16 14:06 tsvetann

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

dead-horse avatar Jun 13 '16 15:06 dead-horse

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'

tsvetann avatar Jun 13 '16 16:06 tsvetann

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

jakewmeyer avatar Mar 16 '18 18:03 jakewmeyer

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.

garretttaco avatar Aug 23 '18 06:08 garretttaco

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

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

CleberRossi avatar Oct 04 '22 04:10 CleberRossi