-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
请确认以下事项
-
我已确认阅读并同意 AGPL-3.0 第15条 。
本程序不提供任何明示或暗示的担保,使用风险由您自行承担。 -
我已确认阅读并同意 AGPL-3.0 第16条 。
无论何种情况,版权持有人或其他分发者均不对使用本程序所造成的任何损失承担责任。 -
我确认我的描述清晰,语法礼貌,能帮助开发者快速定位问题,并符合社区规则。
-
我已确认阅读了OpenList文档。
-
我已确认没有重复的问题或讨论。
-
我已确认是
OpenList的问题,而不是其他原因(例如 网络 ,依赖或操作)。 -
我认为此问题必须由
OpenList处理,而非第三方。 -
我已确认这个问题在最新版本中没有被修复。
OpenList 版本(必填)
v4.1.8
使用的存储驱动(必填)
对象存储
问题描述(必填)
对象存储启用 CDN 后鉴权参数丢失。复现步骤:
- 对象存储配置中,不填写 “自定义主机”,即直接访问原存储,开发者工具中显示被重定向至生成 带 鉴权参数的 URL,可正常访问资源;
- 修改对象存储配置,填写 “自定义主机” 为对象存储加速域名,开发者工具中显示被重定向至 不带 鉴权参数的 URL,存储桶返回 403;
- 手动将步骤 1 中生成的带鉴权参数的 URL 里面的对象存储域名替换为对象存储加速域名,可以正常访问资源;
另外还发现一个问题,在 OpenList 中预览资源内容时,同一个资源会被请求两遍。
日志(必填)
正常请求:
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:89 github.com/OpenListTeam/OpenList/v4/internal/op.Get() op.Get /icon.d.jpg
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:89 github.com/OpenListTeam/OpenList/v4/internal/op.Get() op.Get /icon.d.jpg
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:41]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
异常请求:
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01-cdn
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:89 github.com/OpenListTeam/OpenList/v4/internal/op.Get() op.Get /icon.d.jpg
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01-cdn
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01-cdn
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:89 github.com/OpenListTeam/OpenList/v4/internal/op.Get() op.Get /icon.d.jpg
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/path.go:27 github.com/OpenListTeam/OpenList/v4/internal/op.GetStorageAndActualPath() use storage: /downloads/os/lnjp-01-cdn
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:29 github.com/OpenListTeam/OpenList/v4/internal/op.List() op.List /
�[37mDEBU�[0m[2025-12-27 09:53:48]/source/internal/op/fs.go:33 github.com/OpenListTeam/OpenList/v4/internal/op.List() use cache when list /
配置文件内容(必填)
{
"force": false,
"site_url": "https://dlurl.example.com",
"cdn": "",
"jwt_secret": "eItVZ7JnLma9l40w",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "data/data.db",
"table_prefix": "x_",
"ssl_mode": "",
"dsn": ""
},
"meilisearch": {
"host": "http://localhost:7700",
"api_key": "",
"index": "openlist"
},
"scheme": {
"address": "127.0.0.1",
"http_port": 23001,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": "",
"enable_h2c": false,
"enable_h3": false
},
"temp_dir": "data/temp",
"bleve_dir": "data/bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "data/log/log.log",
"max_size": 50,
"max_backups": 30,
"max_age": 28,
"compress": false,
"filter": {
"enable": false,
"filters": [
{
"cidr": "",
"path": "/ping",
"method": ""
},
{
"cidr": "",
"path": "",
"method": "HEAD"
},
{
"cidr": "",
"path": "/dav/",
"method": "PROPFIND"
}
]
}
},
"delayed_start": 0,
"max_buffer_limitMB": -1,
"mmap_thresholdMB": 4,
"max_connections": 0,
"max_concurrency": 64,
"tls_insecure_skip_verify": true,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1,
"task_persistant": false
},
"transfer": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"upload": {
"workers": 5,
"max_retry": 0,
"task_persistant": false
},
"copy": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"move": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress_upload": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"allow_retry_canceled": false
},
"cors": {
"allow_origins": [
""
],
"allow_methods": [
""
],
"allow_headers": [
"*"
]
},
"s3": {
"enable": false,
"port": 5246,
"ssl": false
},
"ftp": {
"enable": false,
"listen": ":5221",
"find_pasv_port_attempts": 50,
"active_transfer_port_non_20": false,
"idle_timeout": 900,
"connection_timeout": 30,
"disable_active_mode": false,
"default_transfer_binary": false,
"enable_active_conn_ip_check": true,
"enable_pasv_conn_ip_check": true
},
"sftp": {
"enable": false,
"listen": ":5222"
},
"last_launched_version": "v4.1.8",
"proxy_address": ""
}
复现链接(可选)
- 正常请求,不过 CDN:https://dlos.aojie654.com/os/lnjp-01/icon.d.jpg
- 过 CDN,对象存储返回 403: https://dlos.aojie654.com/os/lnjp-01-cdn/icon.d.jpg
- CDN 加速域名:sao-test-os-lnjp-01.akasao.com