Skip to content

Commit

Permalink
Added API + Gateway support for arbitrary HTTP headers
Browse files Browse the repository at this point in the history
This commit fixes + improves CORS support

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
  • Loading branch information
jbenet committed Jul 29, 2015
1 parent 230d544 commit 2bae3cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package config

type API struct {
HTTPHeaders map[string][]string // HTTP headers to return with the API.
}
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Config struct {
Tour Tour // local node's tour position
Gateway Gateway // local node's gateway server options
SupernodeRouting SupernodeClientConfig // local node's routing servers (if SupernodeRouting enabled)
API API // local node's API settings
Swarm SwarmConfig
Log Log
}
Expand Down
1 change: 1 addition & 0 deletions config/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

// Gateway contains options for the HTTP gateway server.
type Gateway struct {
HTTPHeaders map[string][]string // HTTP headers to return with the gateway
RootRedirect string
Writable bool
}

0 comments on commit 2bae3cb

Please sign in to comment.