go-ipfs-config: Added API + Gateway support for arbitrary HTTP headers
This commit fixes + improves CORS support License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
Juan Batiz-Benet committed
Jul 23, 2015 at 18:44 UTC
b73f2d531d1d0159fd4790c562b71cd16578d993
3 files changed
+7
config/api.go
new
+5
@@ -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/config.go
+1
@@ -26,6 +26,7 @@ type Config struct {
26
Tour Tour // local node's tour position
27
Gateway Gateway // local node's gateway server options
28
SupernodeRouting SupernodeClientConfig // local node's routing servers (if SupernodeRouting enabled)
29
+ API API // local node's API settings
30
Swarm SwarmConfig
31
Log Log
32
}
config/gateway.go
+1
@@ -2,6 +2,7 @@ package config
2
3
// Gateway contains options for the HTTP gateway server.
4
type Gateway struct {
5
+ HTTPHeaders map[string][]string // HTTP headers to return with the gateway
6
RootRedirect string
7
Writable bool
8
}