From 7c49dd16d07cc0ec171c51dc3e9a8b091449243c Mon Sep 17 00:00:00 2001 From: Tim Stahel Date: Tue, 4 Sep 2018 15:16:30 +0200 Subject: [PATCH 1/2] move VersionOption after GatewayOption to fix #5422 License: MIT Signed-off-by: Tim Stahel --- cmd/ipfs/daemon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 128efc1aa..3473e179a 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -544,9 +544,9 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e corehttp.MetricsCollectionOption("gateway"), corehttp.CheckVersionOption(), corehttp.CommandsROOption(*cctx), - corehttp.VersionOption(), corehttp.IPNSHostnameOption(), corehttp.GatewayOption(writable, "/ipfs", "/ipns"), + corehttp.VersionOption(), } if len(cfg.Gateway.RootRedirect) > 0 { From a86fea95457d42c2f5751a206a6f3eac00c752de Mon Sep 17 00:00:00 2001 From: Tim Stahel Date: Wed, 5 Sep 2018 00:06:04 +0200 Subject: [PATCH 2/2] change order according to Stebalien's suggestion License: MIT Signed-off-by: Tim Stahel --- cmd/ipfs/daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 3473e179a..5705c3adc 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -542,11 +542,11 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e var opts = []corehttp.ServeOption{ corehttp.MetricsCollectionOption("gateway"), - corehttp.CheckVersionOption(), - corehttp.CommandsROOption(*cctx), corehttp.IPNSHostnameOption(), corehttp.GatewayOption(writable, "/ipfs", "/ipns"), corehttp.VersionOption(), + corehttp.CheckVersionOption(), + corehttp.CommandsROOption(*cctx), } if len(cfg.Gateway.RootRedirect) > 0 {