1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 01:14:27 +00:00
gitea/modules
Zettat123 898f852d03
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
..
actions Fix wrong status of Set up Job when first step is skipped (#32120) (#32125) 2024-09-25 10:19:35 +08:00
activitypub Use forum.gitea.com instead of old URL (#31989) (#31992) 2024-09-07 03:47:23 +08:00
analyze
assetfs
auth
avatar
badge
base Fix natural sort (#31384) (#31394) 2024-06-17 07:41:47 +00:00
cache Increase cacheContextLifetime to reduce false reports (#32011) (#32023) 2024-09-11 11:14:40 +08:00
charset
container
csv
dump
emoji
eventsource
generate
git Refactor the usage of batch catfile (#31754) (#31889) 2024-08-21 01:55:14 +08:00
gitgraph
gitrepo
graceful
hcaptcha
highlight
hostmatcher Support allowed hosts for migrations to work with proxy (#32025) (#32026) 2024-09-11 14:54:19 +08:00
html
httpcache Fix wrong last modify time (#32102) (#32104) 2024-09-22 19:12:57 +00:00
httplib Fix wrong last modify time (#32102) (#32104) 2024-09-22 19:12:57 +00:00
indexer Fixed race condition when deleting documents by repoId in ElasticSearch (#32185) (#32188) 2024-10-03 16:33:26 +00:00
issue/template Support setting the default attribute of the issue template dropdown field (#31045) (#31059) 2024-05-24 11:01:09 +08:00
json
label
lfs Distinguish LFS object errors to ignore missing objects during migration (#31702) (#31745) 2024-07-31 23:06:37 +08:00
log Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
markup Upgrade bleve to 2.4.2 (#31894) 2024-08-21 05:13:59 +00:00
mcaptcha
metrics
migration
nosql
optional
options
packages Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) (#32397) 2024-11-01 03:53:59 +00:00
paginator
pprof
private Move database operations of merging a pull request to post receive hook and add a transaction (#30805) (#30888) 2024-05-08 14:17:18 +00:00
process Update misspell to 0.5.1 and add misspellings.csv (#30573) 2024-04-27 08:03:49 +00:00
proxy
proxyprotocol
public
queue
recaptcha
references Fix markdown rendering when mentioning users (#30795) (#30810) 2024-05-02 09:48:24 +08:00
regexplru
repository Distinguish LFS object errors to ignore missing objects during migration (#31702) (#31745) 2024-07-31 23:06:37 +08:00
secret
session
setting remove typo (#31524) 2024-06-29 15:54:15 +00:00
sitemap
ssh
storage Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) (#32397) 2024-11-01 03:53:59 +00:00
structs Increase max length of org team names from 30 to 255 characters (#31410) (#31421) 2024-06-20 01:27:13 +00:00
svg
sync
system
templates Lazy load avatar images (#32051) (#32063) 2024-09-18 16:52:44 +08:00
test Remove sub-path from container registry realm (#31293) (#31300) 2024-06-10 12:04:49 +08:00
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
uri
user
util Fix project column title overflow (#31011) (#31025) 2024-05-20 06:17:21 +00:00
validation
web Delete legacy cookie before setting new cookie (#31306) (#31317) 2024-06-11 05:57:51 +00:00
webhook