fix: 评论审核 fail-closed + 跳过无 CF 密钥的 docs 部署 - #5
Merged
Merged
Conversation
…out CF secrets When NOTION_COMMENT_REQUIRE_APPROVAL is enabled, refuse to create comments unless Status is a writable select/status property, and support both types. Also skip the upstream VitePress docs Cloudflare deploy when this fork has no CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID configured.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pages/api/notion-comments.js在NOTION_COMMENT_REQUIRE_APPROVAL=true但数据库没有可写的Status(select/status)时,改为 503 fail-closed,不再静默跳过 Pending 却告诉客户端「待审核」,避免评论被当成公开。status类型字段写入 Pending/Approved。CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID。个人博客不需要部署上游文档站,改为缺密钥时跳过并成功结束。Test plan