#2796·OpenList

[功能] 为 S3 直连 302 和 Web Proxy 添加显式兼容性契约

作者: nostalume创建于 2026年7月16日更新于 2026年9月18日
标签needs-transfer: doc

Description of the issue: OpenList's independent S3 endpoint, when the storage has `web_proxy=false` and no other mandatory proxy conditions, authenticated ordinary object GETs may return HTTP 302 if a provider URL-only direct link is available. Not all S3 GETs are redirected. In `server/s3/redirect.go`, `redirectHandler` sets the `Location` and returns `http.StatusFound`. For some strict S3 clients (such as restic), the `GetObject` cannot read the object after receiving a cross-host cloud bucket temporary direct link 302, because it does not conform to the S3 specification. This redirect is not a typical S3 region/endpoint redirect, but instead redirects OpenList's object reading to the provider's temporary URL. After the target storage's `web_proxy=true`, `common.ShouldProxy()` prevents the S3 redirect handler from returning the direct link, and OpenList's local proxy reads the object content, which avoids compatibility issues caused by the cross-host 302.

内容来源: OpenListTeam/OpenList