Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit e1e0c05

Browse files
committed
Added API + Gateway support for arbitrary HTTP headers
This commit fixes + improves CORS support License: MIT Signed-off-by: Juan Batiz-Benet <[email protected]>
1 parent effe470 commit e1e0c05

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

api.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package config
2+
3+
type API struct {
4+
HTTPHeaders map[string][]string // HTTP headers to return with the API.
5+
}

config.go

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type Config struct {
2626
Tour Tour // local node's tour position
2727
Gateway Gateway // local node's gateway server options
2828
SupernodeRouting SupernodeClientConfig // local node's routing servers (if SupernodeRouting enabled)
29+
API API // local node's API settings
2930
Swarm SwarmConfig
3031
Log Log
3132
}

gateway.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package config
22

33
// Gateway contains options for the HTTP gateway server.
44
type Gateway struct {
5+
HTTPHeaders map[string][]string // HTTP headers to return with the gateway
56
RootRedirect string
67
Writable bool
78
}

0 commit comments

Comments
 (0)