Skip to content

Commit

Permalink
Update base.go (go-gitea#19739)
Browse files Browse the repository at this point in the history
use http.StatusTemporaryRedirect(307) when serve avatar directly

browser caches 301 redirections, pre-signed s3 url would expire at some later point

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
3 people authored May 19, 2022
1 parent c27268d commit 3e5ea9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
w,
req,
u.String(),
http.StatusPermanentRedirect,
http.StatusTemporaryRedirect,
)
})
}
Expand Down

0 comments on commit 3e5ea9a

Please sign in to comment.