You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services
Zettat123 0690cb076b
Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (#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)
```

---

Most S3-like services support specifying the content type when storing
objects. However, Gitea always use `application/octet-stream`.
Therefore, I believe we also need to improve the `Save` method to
support storing objects with the correct content type.

b7fb20e73e/modules/storage/minio.go (L214-L221)
3 months ago
..
actions Update scheduled tasks even if changes are pushed by "ActionsUser" (#32246) 4 months ago
agit Make git push options accept short name (#32245) 4 months ago
asymkey Fix some pending problems (#29985) 10 months ago
attachment Add support for API blob upload of release attachments (#29507) 11 months ago
auth Update go dependencies (#32389) 3 months ago
automerge bump to go 1.23 (#31855) 5 months ago
context Allow maintainers to view and edit files of private repos when "Allow maintainers to edit" is enabled (#32215) 4 months ago
contexttest Check if reverse proxy is correctly configured (#30890) 9 months ago
convert Make admins adhere to branch protection rules (#32248) 3 months ago
cron Support repo license (#24872) 4 months ago
doctor Refactor the DB migration system slightly (#32344) 3 months ago
externalaccount allow synchronizing user status from OAuth2 login providers (#31572) 7 months ago
feed More `db.DefaultContext` refactor (#27265) 1 year ago
forms Make admins adhere to branch protection rules (#32248) 3 months ago
gitdiff Update golangci-lint to v1.59.0 (#31221) 8 months ago
indexer Update issue indexer after merging a PR (#30715) 9 months ago
issue refactor: remove redundant err declarations (#32381) 3 months ago
lfs Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (#32365) 3 months ago
mailer Add missing comment reply handling (#32050) 5 months ago
markup Enable more `revive` linter rules (#30608) 9 months ago
migrations Support migrating GitHub/GitLab PR draft status (#32242) 4 months ago
mirror Support repo license (#24872) 4 months ago
notify Clean up log messages (#30313) 10 months ago
oauth2_provider Make oauth2 code clear. Move oauth2 provider code to their own packages/files (#32148) 4 months ago
org Update misspell to 0.5.1 and add `misspellings.csv` (#30573) 9 months ago
packages Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (#32365) 3 months ago
projects Add issue comment when moving issues from one column to another of the project (#29311) 6 months ago
pull Make admins adhere to branch protection rules (#32248) 3 months ago
release Handle invalid target when creating releases using API (#31841) 5 months ago
repository Support repo license (#24872) 4 months ago
secrets Refactor deletion (#28610) 1 year ago
task Fix "force private" logic (#31012) 9 months ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Add warn log when deleting inactive users (#32318) 3 months ago
webhook Support requested_reviewers data in comment webhook events (#26178) 4 months ago
webtheme Initial support for colorblindness-friendly themes (#30625) 9 months ago
wiki Use global lock instead of NewExclusivePool to allow distributed lock between multiple Gitea instances (#31813) 5 months ago