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.
This commit is contained in:
Hector Sanjuan 2022-09-09 16:41:58 +02:00
parent b2b33e8668
commit 7af52bdb4e

View File

@ -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)