From b13380fb0689e3f9e8d4937d9fecfe36f0ff1034 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Sat, 15 Sep 2018 21:04:52 +0200 Subject: [PATCH 1/2] ignore test config file --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a684b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +serialize/.ipfsconfig From ef208a265939a1f7633e22cf182ea4b6b257cdab Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Sat, 15 Sep 2018 21:22:38 +0200 Subject: [PATCH 2/2] Add Gateway.APICommands for /api allowlists --- gateway.go | 1 + init.go | 1 + 2 files changed, 2 insertions(+) diff --git a/gateway.go b/gateway.go index a8ba705..7e64b56 100644 --- a/gateway.go +++ b/gateway.go @@ -6,4 +6,5 @@ type Gateway struct { RootRedirect string Writable bool PathPrefixes []string + APICommands []string } diff --git a/init.go b/init.go index c4ea9e4..22aa699 100644 --- a/init.go +++ b/init.go @@ -66,6 +66,7 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) { "Access-Control-Allow-Methods": []string{"GET"}, "Access-Control-Allow-Headers": []string{"X-Requested-With", "Range"}, }, + APICommands: []string{}, }, Reprovider: Reprovider{ Interval: "12h",