Skip to content

Commit

Permalink
go-ipfs-config: Merge pull request ipfs#2778 from ipfs/feature/CORS-o…
Browse files Browse the repository at this point in the history
…n-gateway-by-default

Add CORS headers to Read Only Gateway Default config
  • Loading branch information
whyrusleeping committed Jun 15, 2016
2 parents c82b581 + 705652e commit d2f3855
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 d2f3855

Please sign in to comment.