1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-07 01:58:19 +00:00

Redirect to a presigned URL of HEAD for HEAD requests (#35088)

Resolves https://github.com/go-gitea/gitea/issues/35086.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Risu
2025-07-16 21:22:45 +10:00
committed by GitHub
parent 0d00ec7eed
commit e1e4815a1c
42 changed files with 85 additions and 72 deletions

View File

@@ -20,7 +20,7 @@ func IsArtifactV4(art *actions_model.ActionArtifact) bool {
func DownloadArtifactV4ServeDirectOnly(ctx *context.Base, art *actions_model.ActionArtifact) (bool, error) {
if setting.Actions.ArtifactStorage.ServeDirect() {
u, err := storage.ActionsArtifacts.URL(art.StoragePath, art.ArtifactPath, nil)
u, err := storage.ActionsArtifacts.URL(art.StoragePath, art.ArtifactPath, ctx.Req.Method, nil)
if u != nil && err == nil {
ctx.Redirect(u.String(), http.StatusFound)
return true, nil