Skip to content

Commit

Permalink
fix cors issue - when origin is null, cors should return null origin. s…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhovey committed Dec 23, 2015
1 parent 77008fe commit 260501f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sockjs/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func xhrCors(rw http.ResponseWriter, req *http.Request) {
header := rw.Header()
origin := req.Header.Get("origin")
if origin == "" || origin == "null" {
if origin == "" {
origin = "*"
}
header.Set("Access-Control-Allow-Origin", origin)
Expand Down

0 comments on commit 260501f

Please sign in to comment.