From 4eeab9d4a0693c7ca9956934745e1669321806ba Mon Sep 17 00:00:00 2001 From: Doug A Date: Fri, 3 Jul 2015 10:28:12 -0400 Subject: [PATCH] Allow CORS for gateway handler. License: MIT Signed-off-by: Doug A --- core/corehttp/gateway_handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 9b66cd13a80..0632ef43253 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -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