Skip to content

Commit 400ddb7

Browse files
committed
Fix CORS whitelist failure on blank ORIGIN header...
1 parent ebcead1 commit 400ddb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

irc-prime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var whitelist = ['http://thecact.us', 'https://thecact.us', 'http://thewalr.us',
2929
var corsOptions = {
3030
origin: function(origin, callback){
3131
var originIsWhitelisted = whitelist.indexOf(origin) !== -1;
32-
callback(null, originIsWhitelisted);
32+
callback(originIsWhitelisted ? null : 'Bad Request', originIsWhitelisted);
3333
},
3434
maxAge: 1728000,
3535
exposedHeaders: 'Location',

0 commit comments

Comments
 (0)