Skip to content

Commit

Permalink
Merge pull request ipfs#2778 from ipfs/feature/CORS-on-gateway-by-def…
Browse files Browse the repository at this point in the history
…ault

Add CORS headers to Read Only Gateway Default config
  • Loading branch information
whyrusleeping committed Jun 15, 2016
2 parents c2e209e + d16629c commit 8466dd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
RootRedirect: "",
Writable: false,
PathPrefixes: []string{},
HTTPHeaders: map[string][]string{
"Access-Control-Allow-Origin": []string{"*"},
"Access-Control-Allow-Methods": []string{"GET"},
"Access-Control-Allow-Headers": []string{"X-Requested-With"},
},
},
}

Expand Down

0 comments on commit 8466dd1

Please sign in to comment.