Browse Source

Add optional http redirect for filer GET requests.

pull/38/head
chrislusf 10 years ago
parent
commit
e431d4121e
  1. 3
      go/weed/weed_server/filer_server_handlers.go

3
go/weed/weed_server/filer_server_handlers.go

@ -83,7 +83,8 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
urlLocation := lookup.Locations[rand.Intn(len(lookup.Locations))].PublicUrl
urlString := "http://" + urlLocation + "/" + fileId
if fs.redirectOnRead {
http.Redirect(w, r, urlString, http.StatusFound)
return
}
u, _ := url.Parse(urlString)
request := &http.Request{

|||||||
100:0
Loading…
Cancel
Save