dsh-trusted-host-is-loopback
其他 活跃维护

dsh-trusted-host-is-loopback

Exagone313/dsh-trusted-host-is-loopback

轻量级变通补丁,将受信主机重写为回环地址,使Web客户端按本机来源放行,从而绕过跨域与权限校验,无需改动业务逻辑。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
2
Open Issues
JavaScript
主要语言
MIT
开源协议
14 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Exagone313/dsh-trusted-host-is-loopback
git clone https://github.com/Exagone313/dsh-trusted-host-is-loopback.git
git clone git@github.com:Exagone313/dsh-trusted-host-is-loopback.git
README.md master

dsh-trusted-host-is-loopback

npm version
License: MIT

A dsh bundle that makes the authenticated Web UI page count as loopback, so
Host-backed settings (Settings → Models, the first-run API-key step, the preview
notice) work when dsh is reached through a reverse proxy instead of 127.0.0.1.

dsh already authenticates every browser that reaches the Web UI — the
Host/Origin trust fence declared with --trusted-host / trustedHosts, plus
the browser-session cookie — but it still classifies a non-loopback page as
remote and caps Host-backed features. This bundle flips that one client-side
flag. ownsHost is a classification only: the server's authentication and its
Host/Origin fence are untouched.

Install

dsh plugin --profile web add @exagone313/dsh-trusted-host-is-loopback

Restart dsh afterwards.

Remove

dsh plugin --profile web remove @exagone313/dsh-trusted-host-is-loopback

Restart dsh afterwards.

Notes

  • No configuration.
  • The Host/Origin trust fence is the boundary: only authorities you declared
    trusted should reach the Web UI. See SECURITY.md.
  • The webserver/index-inject hook belongs to
    @deepseek-ai/dsh-host-webserver; a future rename would require a plugin
    update.
  • Tested against dsh 0.2.0-rc.2.

License

MIT