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

Optionally respond with CORS headers #27

Merged
merged 6 commits into from
Jan 28, 2017
Merged

Optionally respond with CORS headers #27

merged 6 commits into from
Jan 28, 2017

Conversation

doublesharp
Copy link
Contributor

I am developing an application that runs on dynamic hostnames and needed to respond with CORS headers for static content. The new method adds headers to the response that allow the content to be loaded in the browser.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.9%) to 90.968% when pulling 84072dd on doublesharp:master into 71cd9c7 on ericmdantas:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.2%) to 91.613% when pulling 4088d00 on doublesharp:master into 71cd9c7 on ericmdantas:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.2%) to 91.613% when pulling 4961013 on doublesharp:master into 71cd9c7 on ericmdantas:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 95.484% when pulling d37a96b on doublesharp:master into 71cd9c7 on ericmdantas:master.

@ericmdantas
Copy link
Owner

Good job, thanks for the PR.

Only two things before I merge: could you also add a test in options_test.js? Also, could you document the new option in the Readme?

Once that's done, I'll merge and release 1.4.3. Thanks!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 95.484% when pulling ad47b74 on doublesharp:master into 71cd9c7 on ericmdantas:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 96.129% when pulling f7a8da9 on doublesharp:master into 71cd9c7 on ericmdantas:master.

@ericmdantas
Copy link
Owner

Thanks! Merged.

@ericmdantas ericmdantas merged commit 8f30729 into ericmdantas:master Jan 28, 2017
@doublesharp
Copy link
Contributor Author

Awesome, thanks. Aliv has been very useful in our development environment :)

@doublesharp
Copy link
Contributor Author

I was just about to switch back to the npm version and saw that you haven't published 1.5 - are you planning additional changes?

@ericmdantas
Copy link
Owner

Nope, having problems with the publish.

      throw er; // Unhandled 'error' event
      ^

Error: write EINVAL
    at exports._errnoException (util.js:1022:11)
    at WriteStream.Socket._writeGeneric (net.js:715:26)
    at WriteStream.Socket._write (net.js:734:8)
    at doWrite (_stream_writable.js:334:12)
    at writeOrBuffer (_stream_writable.js:320:5)
    at WriteStream.Writable.write (_stream_writable.js:247:11)
    at WriteStream.Socket.write (net.js:661:40)
    at C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\bin\_mocha:425:12
    at Array.forEach (native)
    at exit (C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\bin\_mocha:422:11)
    at done (C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\mocha.js:497:13)
    at Runner.<anonymous> (C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\runner.js:804:5)
    at emitNone (events.js:91:20)
    at Runner.emit (events.js:185:7)
    at C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\runner.js:791:12
    at C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\runner.js:644:9
    at next (C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\runner.js:284:14)
    at Immediate.<anonymous> (C:\Users\_eric\Documents\projects\aliv\node_modules\mocha\lib\runner.js:320:5)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)
npm ERR! Test failed.  See above for more details.

@doublesharp
Copy link
Contributor Author

Good times... It looks like you are on Windows, so perhaps it is this issue nodejs/node#9542? What version of Node are you using? If it is that issue, it looks like the fix is to upgrade to a newer version of Node.

@ericmdantas
Copy link
Owner

Yeah, that was the issue. I had Node 7.1.0 here, updating to 7.4.0 did the trick.

Thanks once again, now it's published 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

Successfully merging this pull request may close these issues.

None yet

3 participants