Skip to content

frpc 把 Host 重写成面板域名,dsh API 不再因 .frp.internal 被拒 #20

Description

@earayu

Context

Stage FRP 验收:面板 HTML 经 frp 已 200,但 /api/* 全部 forbidden。dsh 在 Host 为 cmp-*-cag-*.frp.internal 时拒绝 API;Host 为 127.0.0.1computer-staging.apemind.ai 时正常。frps 按 customDomain 路由,进容器的 Host 必须是 *.frp.internal,除非 frpc 改写。

产品:用 frpc hostHeaderRewrite 改回面板域名。不要放行 .frp.internal

Scope

  • desired/env 下发 host_header(面板 Host,如 computer-staging.apemind.ai
  • _render_frpc 在每个 HTTP proxy 写 hostHeaderRewrite
  • host_header 时不写该行(不放行 frp.internal)
  • 回归:有/无 rewrite、转义

Out of scope

Accept

  • host_header 的 frpc.toml 含 hostHeaderRewrite = "<host>"
  • 无该字段时配置不含 rewrite

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions