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

Đang mở Phù hợp với người mới
#803 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, typescript, yaml
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với ba trang tài liệu đã nêu và xác minh các giá trị mặc định dựa trên static/defaultConfig.yaml và utility/install/installer.ts. Đọc trình xử lý CORS trước khi ghi tài liệu về ý nghĩa của corsAccessList: [null]. Hoàn tất khi các trang phân biệt giá trị mặc định của schema với cài đặt cài đặt ở chế độ dev và giải thích chính xác giá trị của danh sách truy cập.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)

Ngôn ngữ chính
MDX
Star
9
Fork
9
Merge trung bình
5 ngày 5 giờ
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HarperFast/documentation

Tất cả issue của HarperFast/documentation

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.