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

Koa version? #6

Open
niftylettuce opened this issue Sep 5, 2017 · 7 comments
Open

Koa version? #6

niftylettuce opened this issue Sep 5, 2017 · 7 comments

Comments

@niftylettuce
Copy link

No description provided.

@bradvogel
Copy link
Contributor

bradvogel commented Sep 5, 2017

We don't have plans for one, as we're still using Express. But you're welcome to create one and link it here!

@OmgImAlexis
Copy link

@bradvogel are you good with me copying code over to a Koa version as long as I link back here in the README?

@bradvogel
Copy link
Contributor

Yes - all good! We'll cross link too

@OmgImAlexis
Copy link

What's meant to happen if this if is false?

cors-gate/index.js

Lines 87 to 92 in a6bce95

if (ref) {
const parts = url.parse(ref);
req.headers.origin = url.format({
protocol: parts.protocol,
host: parts.host
});

@OmgImAlexis
Copy link

Here's the Koa version with Ava testing. We just need the above issue resolved and then we'll be at 100% coverage.

Ref: https://github.com/ladjs/koa-cors-gate

@wearhere
Copy link
Contributor

wearhere commented Oct 2, 2017

Hey @OmgImAlexis, sorry for the late response. If

cors-gate/index.js

Lines 87 to 92 in a6bce95

if (ref) {
const parts = url.parse(ref);
req.headers.origin = url.format({
protocol: parts.protocol,
host: parts.host
});
is false, we'll be a little less secure since we won't be able to patch the origin in to try to reject unauthorized cross-origin requests, as described in the comment block above that line. Does that answer your question?

@ronkorving
Copy link

ronkorving commented Sep 19, 2018

@OmgImAlexis Is the state of koa-cors-gate stable and complete? I would like to use it, but noticed it's not on NPM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants