master: changing 301 to 308 on redirect to volume servers

fix https://github.com/chrislusf/seaweedfs/issues/1454
This commit is contained in:
Chris Lu 2020-09-09 22:36:10 -07:00
parent 47b3f932e4
commit b183ae54b5

View file

@ -110,7 +110,7 @@ func (ms *MasterServer) redirectHandler(w http.ResponseWriter, r *http.Request)
} else {
url = util.NormalizeUrl(loc.PublicUrl) + r.URL.Path
}
http.Redirect(w, r, url, http.StatusMovedPermanently)
http.Redirect(w, r, url, http.StatusPermanentRedirect)
} else {
writeJsonError(w, r, http.StatusNotFound, fmt.Errorf("volume id %s not found: %s", vid, location.Error))
}