Skip to content

Commit

Permalink
rpc: add 'Access-Control-Allow-Origin: *' HTTP header
Browse files Browse the repository at this point in the history
  • Loading branch information
xiphon committed Apr 1, 2019
1 parent 7016ed3 commit 3d363bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions network/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func WithRpcServer(hostPort string, handlers map[string]interface{}, callback fu
}

headers := http.Header{}
headers.Add("Access-Control-Allow-Origin", "*")
headers.Add("Content-Type", "application/json")

server.Loop(listener, assigner, &server.LoopOptions{
Expand Down

0 comments on commit 3d363bf

Please sign in to comment.