aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorGuo Y.K <hi@guoyk.net>2022-05-19 23:20:34 +0800
committerGitHub <noreply@github.com>2022-05-19 11:20:34 -0400
commit3e5ea9a9788b4c908a85b7ccc532e559ab8610a0 (patch)
tree4eeb91cf9ac3efa3faae0c0dbe3ea71cc0972460 /routers
parentc27268db21427fcf6f8d90cce8713febdb6f4719 (diff)
downloadgitea-3e5ea9a9788b4c908a85b7ccc532e559ab8610a0.tar.gz
gitea-3e5ea9a9788b4c908a85b7ccc532e559ab8610a0.zip
Update base.go (#19739)
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>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/base.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/base.go b/routers/web/base.go
index 938abaef81..5f817c77ce 100644
--- a/routers/web/base.go
+++ b/routers/web/base.go
@@ -62,7 +62,7 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
w,
req,
u.String(),
- http.StatusPermanentRedirect,
+ http.StatusTemporaryRedirect,
)
})
}