1Panel-dev / 1Panel-dev/1Panel

[Bug] The Caddyfile in the dsh image uses a dot in the API path

Open
#13,839 1 comment 0 reactions 1 assignee View on GitHub

@wanghe-fit2cloud is already working on this.

Since Sep 16, 2026.

type: question
Dominant language
Go
Stars
37k
Forks
3.4k
Avg merge
9h 16m
Merged PRs (30d)
105

Description

Contact Information

3034173687@qq.com

1Panel Version

v2.25

Problem Description

deepseek harness 镜像里那份 Caddyfile 把 API 路径写成了点号,真实接口是斜杠:
镜像里写的: @settings_api path /api/settings.describe /api/credentials.describe ...
真实接口是: /api/settings/describe /api/credentials/describe
于是 route @settings_api 永远匹配不上,是一段死代码。它里面那两句关键处理——header_up -Origin(抹掉 Origin)和 CSRF 拦截——全部从未生效。结果所有 /api/* 都直落通用路由,带着原样的 Origin 撞上 DSH 自己的防 DNS-rebinding 栅栏(dsh-client-connection 注释里明写靠 Host + Origin 判定),一律 403 Forbidden。

另外一个问题在低版本的iso系统上会出现,插件 @deepseek-ai/dsh-client-ui-sidebar-documentpreview 使用了 ES2025 的全局 Iterator(Iterator Helpers),iOS 18.4 以下 / 旧版 JavaScriptCore 不支持,导致模块 import 阶段抛 Can't find variable: Iterator,插件加载失败。请在入口文件顶部引入 import 'core-js/proposals/iterator-helpers',并将构建 target 下调至 es2022。我这边自己已经解决了。

Steps to Reproduce

为什么平时看不出来、只有飞牛 App 炸:浏览器直连时 Origin 就是
https://192.168.8.106:10443/
,和 Host 天然一致 → 栅栏放行;飞牛 App 把页面套在自己的壳里(Origin 是 office.app.5ddd.com:<随机端口>)→ Origin 与 Host 不一致 → 所有接口 403、WebSocket 403 → UI 卡在"自动重连中"。所以这是个只在被反代/内嵌时才暴露的潜伏 bug

The expected correct result

App 式 HTTP 接口 | 415(原 403)✅
App 式 WebSocket | 101 ✅
跨站 Origin + cross-site(防护对照) | 403 ✅ 仍拦截
浏览器直连 | 415 ✅

Related log output

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.