@cryptotaxi247 / kubo / commits / b21044fe4

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 b21044fe42b970b7cea74be674c38637ee28bf78
1 file changed +5
repo/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