From 7af52bdb4ebae34de679b5f0a65774597686e716 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 9 Sep 2022 16:41:58 +0200 Subject: [PATCH] ipfsproxy: forward block/put and dag/put with pin=false Since the pin argument is interpreted and performed by cluster. Pins may be allocated to other nodes. --- api/ipfsproxy/ipfsproxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/ipfsproxy/ipfsproxy.go b/api/ipfsproxy/ipfsproxy.go index b11682b9..7d636fd4 100644 --- a/api/ipfsproxy/ipfsproxy.go +++ b/api/ipfsproxy/ipfsproxy.go @@ -869,6 +869,9 @@ func (proxy *Server) dagPutHandler(w http.ResponseWriter, r *http.Request) { r.URL.Host = u2.Host r.URL.Scheme = u2.Scheme r.Host = u2.Host + newQuery := r.URL.Query() + newQuery.Set("pin", "false") + r.URL.RawQuery = newQuery.Encode() r.RequestURI = "" res, err := proxy.reverseProxy.Transport.RoundTrip(r)