Skip to content

Commit

Permalink
Allow CORS for gateway handler.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Doug A <[email protected]>
  • Loading branch information
Doug A committed Jul 3, 2015
1 parent 5203eac commit 4eeab9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
}

w.Header().Set("X-IPFS-Path", urlPath)
w.Header().Set("Access-Control-Allow-Origin", "*")

// Suborigin header, sandboxes apps from each other in the browser (even
// though they are served from the same gateway domain). NOTE: This is not
Expand Down

0 comments on commit 4eeab9d

Please sign in to comment.