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

fix: support Koa2 / Node 6.2 #20

Closed
wants to merge 1 commit into from
Closed

fix: support Koa2 / Node 6.2 #20

wants to merge 1 commit into from

Conversation

leecade
Copy link

@leecade leecade commented Jul 6, 2016

fixes #18

@leecade leecade changed the title support Koa2 / Node 6.2, fixes #2 support Koa2 / Node 6.2, fixes #18 Jul 6, 2016
@codecov-io
Copy link

Current coverage is 98.11%

Merging #20 into v2.x will decrease coverage by 1.88%

@@               v2.x        #20   diff @@
==========================================
  Files             1          1          
  Lines            53         53          
  Methods           3          3          
  Messages          0          0          
  Branches         19         20     +1   
==========================================
- Hits             53         52     -1   
- Misses            0          1     +1   
  Partials          0          0          

Powered by Codecov. Last updated by a62232d...9691dec

@fengmk2
Copy link
Member

fengmk2 commented Jul 10, 2016

@leecade ci test fail

@fengmk2 fengmk2 changed the title support Koa2 / Node 6.2, fixes #18 fix: support Koa2 / Node 6.2 Jul 10, 2016
@@ -51,7 +51,7 @@ module.exports = function(options) {
return function cors(ctx, next) {
// If the Origin header is not present terminate this set of steps.
// The request is outside the scope of this specification.
const requestOrigin = ctx.get('Origin');
const requestOrigin = ctx.get('Origin') || ctx.origin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test case for this fix?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctx.origin points to the url to which the client connects to not the origin header right? Is this fix correct?

@gabzim
Copy link

gabzim commented Dec 3, 2016

can this be rebased and merged?

@RobertHerhold
Copy link

What's the status of this? @fengmk2

@fengmk2
Copy link
Member

fengmk2 commented Mar 1, 2017

@leecade should rebase and add a test case for this change.

@fengmk2 fengmk2 changed the base branch from v2.x to master June 16, 2017 08:25
@luisfarzati
Copy link

I think this PR can be closed since Node 6 support was just dropped since 3.0.0.

Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @luisfarzati, should close this.

@dead-horse
Copy link
Member

close for now, seems it is not a fix for this problem. :(

@dead-horse dead-horse closed this May 17, 2020
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

Successfully merging this pull request may close these issues.

Not setting headers on Koa2 / Node 6.2
9 participants