Skip to content

Commit 21f5d47

Browse files
committed
Merge pull request #173 from /issues/168
Set origin to '*' if not available
2 parents efca52d + 339a8f2 commit 21f5d47

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ function setupConfig(app) {
4747
}
4848

4949
function crossOriginAllower(req, res, next) {
50-
var origin = req.header('Origin', '*');
51-
if (origin == 'null') {
52-
origin = '*';
53-
}
50+
51+
var origin = req.headers['origin'] || '*';
5452

5553
res.header('Access-Control-Allow-Origin', origin);
5654
res.header('Access-Control-Allow-Credentials', 'true');

0 commit comments

Comments
 (0)