Skip to content

docs:Update the FAQ document - #861

Merged
yjlu666 merged 1 commit into
iflytek:mainfrom
yjlu666:feature/cicd
Jan 15, 2026
Merged

yjlu666 merged 1 commit into
iflytek:mainfrom
yjlu666:feature/cicd

Conversation

@yjlu666

@yjlu666 yjlu666 commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Related Issue

Changes

Testing

  • Existing tests pass
  • New tests added (if applicable)
  • Manual testing completed

Screenshots (if applicable)

Checklist

  • Code follows project coding standards
  • Self-review completed
  • Documentation updated (if needed)
  • Breaking changes documented

@CLAassistant

CLAassistant commented Jan 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@yjlu666
yjlu666 merged commit b80cdb7 into iflytek:main Jan 15, 2026
6 of 8 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

此 PR 添加了关于如何启用 HTTPS 的新 FAQ 章节,这非常有帮助。提供的 Nginx 配置是一个很好的起点,但存在一些安全弱点和潜在的配置陷阱。我添加了一些评论以加强安全配置,并使说明对于在生产环境中设置项目的用户更加清晰。

Comment thread faq/features.md

server {
listen 80;
server_name localhost;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

对于本地测试,server_name 使用 localhost 是可以的,但这份文档也可能用于生产环境部署。建议在文档中明确指出,用户需要将第 140、162 和 294 行的 localhost 替换为服务的实际域名。否则,当通过域名访问时,Nginx 可能无法正确处理请求。

Comment thread faq/features.md
Comment on lines +143 to +145
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

X-XSS-Protection 响应头已被弃用,不推荐使用,因为它可能在现代浏览器中引入安全漏洞。建议移除此响应头。同时,建议添加 Referrer-Policy 以增强隐私保护。

Suggested change
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;

Comment thread faq/features.md
Comment on lines +169 to +171
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

可以加强此 HTTPS 服务块的安全响应头。X-XSS-Protection 响应头已被弃用,应予以移除。更重要的是,应添加 Strict-Transport-Security (HSTS) 响应头,以确保浏览器只通过 HTTPS 连接到您的站点。同时,也建议考虑添加 Referrer-Policy 响应头以增强隐私保护。

Suggested change
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;

Comment thread faq/features.md
Comment on lines +301 to +303
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

与另一个 HTTPS 服务块类似,这里的安全响应头可以得到改进。X-XSS-Protection 响应头已被弃用,应予以移除。添加 Strict-Transport-Security (HSTS) 响应头来强制执行 HTTPS 非常重要。也请考虑添加 Referrer-Policy 响应头。

Suggested change
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants