Gate IndexNow pings behind privacy config#28408
Merged
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThis PR adds a privacy gate to the IndexNow service: the service imports the shared config module and returns early from ping() when config.isPrivacyDisabled('useIndexNow') is true. Unit tests import and stub config.isPrivacyDisabled and add a test asserting no outbound IndexNow request when the privacy setting disables it. The e2e environment constants are updated to include privacy__useIndexNow=false. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
IndexNow notifies search engines on publish by pinging an external
API. Tests and local dev run against real networks, so the ping could
fire from non-production environments.
Gate the ping on config.isPrivacyDisabled('useIndexNow'), consistent
with update-check, gravatar, and structured data. It can now be
disabled via privacy.useIndexNow=false or privacy.useTinfoil=true.
Default behaviour is unchanged: with no privacy config the ping still
fires in production.
Also disable it in the e2e environment, which boots Ghost with real
network access.
df927df to
d53df93
Compare
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
IndexNow notifies search engines when content is published or updated by pinging an external API. Tests and local dev run against real networks, so the ping can fire from non-production environments.
This gates the ping behind Ghost's existing privacy config:
config.isPrivacyDisabled('useIndexNow')short-circuits the ping, consistent withupdate-check,gravatar, and structured dataprivacy: {useIndexNow: false}orprivacy: {useTinfoil: true}privacy__useIndexNow=falsein the e2e environment, which boots Ghost with real network accessTests
privacy.useIndexNowis disabled