Skip to content

[Bug]: Webdav CORS 策略前缀限制在 http / https 且不可配置导致 Tampermonkey 插件备份失败 #396

Description

@YewFence

What happened?

Webdav CORS 策略前缀限制在 http / https 且不可配置导致 Tampermonkey 插件无法通过 Webdav 进行备份,浏览器报错内容如下

{
    "code": "bad_request",
    "msg": "CORS origin must use http or https: 'chrome-extension://iikmkjmpaadaobahmlepeloendndfphd'",
    "error": {
        "retryable": false
    }
}

Steps to reproduce

  1. 在 AsterDrive 里面维持默认设置,没有 CORS 配置
  2. 创建一个 Webdav 服务账户
  3. 将服务账户凭证和端点填入 Tampermonkey 插件,尝试点击 Export 进行配置导出
  4. 观察到上述错误

Expected behavior

Tampermonkey 配置应该可以正常导出

Actual behavior

Tampermonkey 配置导出由于 CORS 策略而失败

AsterDrive version

v0.3.2

Installation method

Docker / Compose

Database backend

PostgreSQL

Storage backend involved

Local filesystem

Environment

Error messages / logs

Relevant configuration

Checklist

  • I have searched existing issues for duplicates
  • I have checked the documentation and FAQ
  • I have removed secrets and private credentials from this report

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingWait For More InfoWaiting for more information from reporter

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions