Skip to content

Commit

Permalink
sockjs/sockjs-client#49 - Respond with '*' to 'null' origin
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Mar 6, 2012
1 parent 3534293 commit b2081aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/trans-xhr.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ exports.app =
return true

xhr_cors: (req, res, content) ->
origin = req.headers['origin'] or '*'
if !req.headers['origin'] or req.headers['origin'] is 'null'
origin = '*'
else
origin = req.headers['origin']
res.setHeader('Access-Control-Allow-Origin', origin)
headers = req.headers['access-control-request-headers']
if headers
Expand Down

0 comments on commit b2081aa

Please sign in to comment.