Skip to content

Commit

Permalink
go-ipfs-config: Add CORS headers to Read Only Gateway Default config
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Jun 1, 2016
1 parent e36dc46 commit 705652e
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 705652e

Please sign in to comment.