http.cors is documented as default true; the schema default is false and only a dev-mode install writes true

未关闭 适合新手
#803 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
markdown, typescript, yaml
领域
documentation

调研方向

从提到的三个文档页面开始,并根据 static/defaultConfig.yaml 和 utility/install/installer.ts 核实默认值。阅读 CORS 处理器,然后再说明 corsAccessList: [null] 的含义。完成标准是:各页面区分 schema 默认值与 dev 模式安装设置,并准确解释访问列表的值。

由索引模型根据 Issue 内容生成。

描述

Problem

The documentation says the application HTTP port's http.cors defaults to true. The schema default is false; true with corsAccessList: ['*'] is only what a dev-mode install writes into the config file.

Affected pages:

  • reference/http/configuration.md (### http.cors): "Default: true"
  • reference/configuration/options.md: "cors ... Default: true"
  • learn/getting-started/install-and-connect-harper.mdx: "HTTP (and WS): 9926, CORS: enabled for *"

A user who deploys with production defaults (or a non-interactive install without a dev-mode flag) gets no Access-Control-Allow-Origin from the application port, contrary to the docs.

Evidence

On harper main: static/defaultConfig.yaml has http.cors: false and corsAccessList: [null]; only the operations API block ships cors: true, corsAccessList: ['*']. utility/install/installer.ts defines DEV_MODE_CONFIG, which sets http_cors: true and a * access list when the install is in dev mode (the interactive default). A non-interactive install without the dev-mode setting is treated as production and does not set them.

Not measured: the effective value on an installed instance via get_configuration.

Proposed fix

  • In reference/http/configuration.md and reference/configuration/options.md: "Default: false (a dev-mode install writes true with corsAccessList ['*'])".
  • In the install guide, say the * CORS setting applies to dev-mode installs.
  • Add a note beside corsAccessList stating what the shipped [null] value means once CORS is enabled (confirm against the CORS handler before wording it).

Related

Related config docs issues: documentation#530 (MCP Origin validation), documentation#151 (corsAccessControlAllowHeaders); neither covers the default.

Source: QA finding SF-79 (finding-triage wave 47)

主要语言
MDX
星标
9
派生
9
平均合并
5 天 5 小时
30 天内合并 PR
48

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HarperFast/documentation 的其他 Issue

查看 HarperFast/documentation 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。