@cryptotaxi247 / kubo / commits / 705652ea6

go-ipfs-config: Add CORS headers to Read Only Gateway Default config

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed May 17, 2016 at 20:42 UTC 705652ea637081daf7118227fc80e78d8ba0aac7
1 file changed +5
config/init.go
+5
@@ -62,6 +62,11 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
62 RootRedirect: "",
63 Writable: false,
64 PathPrefixes: []string{},
65 + HTTPHeaders: map[string][]string{
66 + "Access-Control-Allow-Origin": []string{"*"},
67 + "Access-Control-Allow-Methods": []string{"GET"},
68 + "Access-Control-Allow-Headers": []string{"X-Requested-With"},
69 + },
70 },
71 }
72