agrueneberg / Corser

CORS middleware for Node.js
MIT License
91 stars 11 forks source link

Check next is available prior to calling #9

Closed DamonOehlman closed 11 years ago

DamonOehlman commented 11 years ago

Was using this corser in the following configuration and it broke:

var http = require('http'),
    corser = require('corser'),
    server = http.createServer(corser.create());

This commit makes it not break :)

BTW, Great to see a module doing this without relying on express / connect isms :)

agrueneberg commented 11 years ago

Thanks, Damon! So far I have only used Corser to put it in front of something, not standalone. What were you trying to do? Have to check how preflight requests behave before I merge this, right now you have to close them yourself.