Skip to content

Conversation

@westng
Copy link
Member

@westng westng commented Sep 25, 2025

image

Summary by CodeRabbit

  • 文档
    • 在英文、日文、繁体中文(港/台)FAQ 的 Nginx 上传相关章节新增警告:如仍遇 403 Forbidden,请确认 uploads 目录权限为 755,且属主为 www。
    • 更新简体中文 FAQ 的 Nginx /uploads/ 示例:改为具体路径;缓存从 7d 调整为 30d,设置 Cache-Control=public;CORS 放宽为 *;新增仅允许常见图片并启用长效 immutable 缓存的规则,拒绝非图片类型;并加入上述权限警告。

@vercel
Copy link

vercel bot commented Sep 25, 2025

@westng is attempting to deploy a commit to the deathsatan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for super-cobbler-53ff65 failed. Why did it fail? →

Name Link
🔨 Latest commit b8c6af7
🔍 Latest deploy log https://app.netlify.com/projects/super-cobbler-53ff65/deploys/68d55d81e653ee0008485378

@coderabbitai
Copy link

coderabbitai bot commented Sep 25, 2025

Walkthrough

在多语言 FAQ 文档中新增关于 uploads 目录权限与所有权的警告说明;同时在简体中文 FAQ 中显著扩充 Nginx /uploads/ 配置示例,包括别名路径、缓存与 CORS 设置、按文件类型的允许/拒绝规则与长期缓存指令更新。

Changes

Cohort / File(s) Summary
Uploads 权限告警补充(多语言)
docs/en/faq/index.md, docs/ja/faq/index.md, docs/zh-hk/faq/index.md, docs/zh-tw/faq/index.md
在 Nginx 上传/已上传图片相关示例后新增警告块,提示若仍 403 Forbidden,请检查 uploads 目录权限为 755,所有者为 www。未改动逻辑与配置内容。
Nginx /uploads/ 示例增强(中文简体)
docs/zh/faq/index.md
更新 /uploads/ 配置:具体化 alias 路径;expires 从 7d 调整为 30d;Cache-Control 扩展为 public;Access-Control-Allow-Origin 改为 *;新增嵌套 location:允许常见图片并设长效 immutable 缓存,拒绝非图片类型(php/html/htm/js/css);补充权限警告说明。

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zds-s

Poem

小兔敲键写箴言,
uploads 权限要看全。
七日改三十,缓存更稳妥,
星号放行跨域前。
图档可久存,脚本请莫连,
403?查 owner 与 755,稳!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed PR 标题简洁明确地反映了此次更改的核心:在 FAQ 文档中添加针对 403 Forbidden 错误的解决方案,因此符合最佳实践。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested a review from zds-s September 25, 2025 15:20
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
docs/zh-hk/faq/index.md (1)

60-64: 明确说明 Web 服务账户

不同环境下站点服务账户名称不一(常见如 www-datanginx 等),直接写成 www 容易导致照抄后仍然 403。建议改成描述“运行网站的账号”,并在括号中举例 www,兼顾准确性与可读性。

-如果已確認所有設定均正確,但仍無法訪問並出現 403 Forbidden,請檢查 `uploads` 目錄的權限是否設為 755,並確保所屬使用者為 `www`。
+如果已確認所有設定均正確,但仍無法訪問並出現 403 Forbidden,請檢查 `uploads` 目錄的權限是否設為 755,並確保所屬使用者為執行網站服務的帳號(例如 `www`)。
docs/zh-tw/faq/index.md (1)

60-64: 避免对运行用户名称作单一假设

同样地,建议把“所属使用者为 www”改成描述实际运行网站服务的账号,再举例 www,以免用户在 www-data 等环境照抄后仍遇到 403。

-如果已確認所有設定均正確,但仍無法訪問並出現 403 Forbidden,請檢查 `uploads` 目錄的權限是否設為 755,並確保所屬使用者為 `www`。
+如果已確認所有設定均正確,但仍無法訪問並出現 403 Forbidden,請檢查 `uploads` 目錄的權限是否設為 755,並確保所屬使用者為執行網站服務的帳號(例如 `www`)。
docs/en/faq/index.md (1)

55-59: Clarify the owner requirement

直接指定 owner 为 www 在部分环境(如 www-datanginx)会产生误导。建议改成“与实际 web 服务账号一致(例如 www)”的描述,让读者知道要匹配各自环境。

-If all configurations are confirmed to be correct but you still cannot access the site and encounter a 403 Forbidden error, please check whether the `uploads` directory permissions are set to 755 and ensure that the owner is `www`.
+If all configurations are confirmed to be correct but you still cannot access the site and encounter a 403 Forbidden error, please check whether the `uploads` directory permissions are set to 755 and ensure that the owner matches the web service account (for example, `www`).
docs/ja/faq/index.md (1)

55-59: 避免限定所有者必须是 www

不同环境下运行用户名称不一,建议把说明调整为“Web サーバーの実行ユーザー(例:www)”,避免误导。

-すべての設定が正しいことを確認しても、依然としてアクセスできず **403 Forbidden** が表示される場合は、`uploads` ディレクトリのパーミッションが **755** に設定されているか、所有者が `www` であるかを確認してください。
+すべての設定が正しいことを確認しても、依然としてアクセスできず **403 Forbidden** が表示される場合は、`uploads` ディレクトリのパーミッションが **755** に設定されているか、所有者が Web サーバーの実行ユーザー(例:`www`)であるかを確認してください。
docs/zh/faq/index.md (1)

70-74: 泛化运行账号名称,避免误导

同样建议把“所属用户为 www”改成“运行网站服务的用户(例如 www)”,方便 www-datanginx 等环境直接理解并套用。

-如果确认所有配置均正确,但仍无法访问并且出现 403 Forbidden,请检查 `uploads` 目录的权限是否设置为 755,并确保所属用户为 `www`。
+如果确认所有配置均正确,但仍无法访问并且出现 403 Forbidden,请检查 `uploads` 目录的权限是否设置为 755,并确保所属用户为运行网站服务的账号(例如 `www`)。
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b84c1a8 and b8c6af7.

📒 Files selected for processing (5)
  • docs/en/faq/index.md (1 hunks)
  • docs/ja/faq/index.md (1 hunks)
  • docs/zh-hk/faq/index.md (1 hunks)
  • docs/zh-tw/faq/index.md (1 hunks)
  • docs/zh/faq/index.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-25T06:32:10.763Z
Learnt from: People-Sea
PR: mineadmin/MineAdmin#681
File: README-en.md:5-5
Timestamp: 2025-08-25T06:32:10.763Z
Learning: 在 MineAdmin 项目中,README 文件的 logo 图片使用本地路径 `web/public/logo.svg`,而不是外部 URL,以确保在各种环境下都能正确显示。

Applied to files:

  • docs/zh/faq/index.md

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