gitea/routers/api/actions
Zettat123 898f852d03
Some checks are pending
release-nightly / disk-clean (push) Waiting to run
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) (#32397)
Backport #32365

Fix #28121

I did some tests and found that the `missing signature key` error is
caused by an incorrect `Content-Type` header. Gitea correctly sets the
`Content-Type` header when serving files.


348d1d0f32/routers/api/packages/container/container.go (L712-L717)
However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may
be set to an incorrect value by the storage service. To fix this issue,
we can use query parameters to override response header values.

https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html <img
width="600px"

src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555"
/>

In this PR, I introduced a new parameter to the `URL` method to support
additional parameters.

```
URL(path, name string, reqParams url.Values) (*url.URL, error)
```
2024-11-01 03:53:59 +00:00
..
ping Upgrade Go 1.22 and upgrade dependency (#29869) 2024-03-17 15:40:05 +00:00
runner Remove deprecated stuff for runners (#30930) (#30931) 2024-05-10 16:57:30 +08:00
actions.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
artifact.pb.go Actions Artifacts v4 backend (#28965) 2024-03-02 09:12:17 +00:00
artifact.proto Actions Artifacts v4 backend (#28965) 2024-03-02 09:12:17 +00:00
artifacts_chunks.go Reduce memory usage for chunked artifact uploads to MinIO (#31325) (#31338) 2024-06-12 16:25:46 +02:00
artifacts_utils.go Actions Artifacts v4 backend (#28965) 2024-03-02 09:12:17 +00:00
artifacts.go Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) (#32397) 2024-11-01 03:53:59 +00:00
artifactsv4.go Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) (#32397) 2024-11-01 03:53:59 +00:00