docs: set redirects to premanent = true#2635
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAll redirect entries in ChangesRedirect Permanence Conversion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
vercel.json (1)
11-1643:⚠️ Potential issue | 🟡 MinorTest permanent redirects before deploying—verify destination accessibility and monitor browser caching.
This PR sets 329 redirects to permanent (301) status in Vercel's redirects configuration. Permanent redirects are aggressively cached by browsers and search engines, making them difficult to revert.
Specific concerns to address:
Destination validation: External URLs containing regex patterns (
:path,$) cannot be easily validated via HTTP checks, but a sample of concrete destinations (e.g.,https://www.ory.com/docs/welcome,https://github.com/ory/kratos/blob/master/CHANGELOG.md) should be verified as accessible.Redirect stability: Confirm that destination URLs have been stable for at least 6 months and are unlikely to change soon. Changes after permanent redirect deployment require updating the rules.
No problematic chains found: The detected redirect patterns (e.g.,
/docs/oauth2-oidcused as both source and destination in different rules) are intentional consolidation patterns, not circular chains.Recommendation: Test in staging environment for at least 1-2 weeks before rolling out to production. Monitor 301 response counts and verify no unexpected 404s occur on destination URLs.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@vercel.json` around lines 11 - 1643, Test and validate the permanent redirects configuration in vercel.json before deploying to production. First, deploy the redirect rules to a staging environment and test for 1-2 weeks, monitoring HTTP responses for unexpected 404s on destination URLs. Verify that a representative sample of destination URLs (such as https://www.ory.com/docs/welcome, https://github.com/ory/kratos/blob/master/CHANGELOG.md, and several destination paths using pattern variables like :path) are currently accessible and stable. Confirm that none of the redirect source and destination pairs form circular chains or problematic redirect loops. Only proceed to production deployment after validation is complete and stable behavior has been confirmed in the staging environment.
🧹 Nitpick comments (2)
vercel.json (2)
391-398: ⚡ Quick winConsider whether business/marketing pages warrant permanent redirects.
These redirects point to business-oriented pages (pricing, cloud landing). Marketing and pricing pages typically change more frequently than technical documentation due to evolving business needs.
Permanent redirects (301) limit flexibility for future restructuring. If these are recent redirects or might change with business strategy updates, consider keeping them temporary (302).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@vercel.json` around lines 391 - 398, The redirect entries with source paths /docs/cloud/developer and /docs/cloud/cloud-roadmap are configured with permanent set to true, but should be changed to temporary redirects. Update the permanent property from true to false for both of these redirect objects in the vercel.json configuration to maintain flexibility for future business page restructuring.
216-233: Verify GitHub master branch stability before permanent redirects.These redirects point to CHANGELOG files on GitHub's
masterbranch. The current URLs are all functional (HTTP 200), and all four Ory projects (hydra, keto, oathkeeper, kratos) currently usemasteras their default branch.However, permanent 301 redirects are cached indefinitely by browsers. If these projects rename
mastertomainin the future, these redirects will break. Consider either:
- Updating redirects to use a stable branch name (e.g.,
latest-releaseor a specific release tag)- Monitoring for branch renames and updating redirects accordingly
- Using temporary (302) redirects instead of permanent (301) ones for better flexibility
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@vercel.json` around lines 216 - 233, The CHANGELOG redirect rules for hydra, keto, oathkeeper, and kratos projects use permanent (301) redirects pointing to the master branch on GitHub. Change the "permanent": true flag to "permanent": false for all four CHANGELOG redirect rules (the ones with sources matching /docs/hydra/(CHANGELOG|changelog), /docs/keto/(CHANGELOG|changelog), /docs/oathkeeper/(CHANGELOG|changelog), and /docs/kratos/(CHANGELOG|changelog)) to use temporary (302) redirects instead, which will allow these redirects to be updated in the future if the projects change their default branch names without breaking cached redirects.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@vercel.json`:
- Around line 366-369: The contributing redirect pattern at the destination URL
uses GitHub's master branch, which presents the same branch stability risk as
mentioned in the CHANGELOG redirects at lines 216-233. Update the destination
URL in this redirect rule to use a more stable branch (such as main instead of
master), or if keeping master, ensure this change is coordinated with the
CHANGELOG redirect verification to confirm that the master branch is stable
across all four Ory repositories (kratos, hydra, keto, oathkeeper) before
marking the redirect as permanent.
- Around line 41-48: The redirect rule with source "/keto/docs/(|v0.5/):engine"
has a destination URL that returns HTTP 404 and is marked as permanent
(permanent: true). To fix this, either update the destination URL to point to a
valid working resource (verify the correct GitHub path exists), or change the
permanent property from true to false to use temporary redirects until the
correct destination URL is confirmed. Do not keep permanent redirects pointing
to non-existent URLs as they will be cached indefinitely by browsers and search
engines.
---
Outside diff comments:
In `@vercel.json`:
- Around line 11-1643: Test and validate the permanent redirects configuration
in vercel.json before deploying to production. First, deploy the redirect rules
to a staging environment and test for 1-2 weeks, monitoring HTTP responses for
unexpected 404s on destination URLs. Verify that a representative sample of
destination URLs (such as https://www.ory.com/docs/welcome,
https://github.com/ory/kratos/blob/master/CHANGELOG.md, and several destination
paths using pattern variables like :path) are currently accessible and stable.
Confirm that none of the redirect source and destination pairs form circular
chains or problematic redirect loops. Only proceed to production deployment
after validation is complete and stable behavior has been confirmed in the
staging environment.
---
Nitpick comments:
In `@vercel.json`:
- Around line 391-398: The redirect entries with source paths
/docs/cloud/developer and /docs/cloud/cloud-roadmap are configured with
permanent set to true, but should be changed to temporary redirects. Update the
permanent property from true to false for both of these redirect objects in the
vercel.json configuration to maintain flexibility for future business page
restructuring.
- Around line 216-233: The CHANGELOG redirect rules for hydra, keto, oathkeeper,
and kratos projects use permanent (301) redirects pointing to the master branch
on GitHub. Change the "permanent": true flag to "permanent": false for all four
CHANGELOG redirect rules (the ones with sources matching
/docs/hydra/(CHANGELOG|changelog), /docs/keto/(CHANGELOG|changelog),
/docs/oathkeeper/(CHANGELOG|changelog), and /docs/kratos/(CHANGELOG|changelog))
to use temporary (302) redirects instead, which will allow these redirects to be
updated in the future if the projects change their default branch names without
breaking cached redirects.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ee47737c-7d70-4d4b-9eff-0966bbd9f565
📒 Files selected for processing (1)
vercel.json
* feat: Ory Network CTA for OSS deployment only * refactor: simplify image source handling in OryNetworkCta component
* feat: improve actions ux docs * feat: apply suggestion remove bold * feat: apply suggestion on for one
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/api.json`:
- Around line 8502-8506: The notify_previous_addresses_config_recipients field
documents the allowed values ("all", "all_verified", "removed") only in the
description text but does not enforce them at the schema level, which allows
invalid values to pass validation. Add an enum property to the
notify_previous_addresses_config_recipients field definition with the three
allowed values to ensure the schema enforces valid inputs rather than relying
solely on documentation.
In `@src/theme/TOC/index.js`:
- Around line 11-18: The isOssDeployment function incorrectly assumes the
sidebar parameter is an object with an items property, but useDocsSidebar()
actually returns an array of PropSidebarItem objects. Fix this by iterating the
sidebar array directly instead of accessing sidebar?.items, and when you
encounter category items within the array, recursively check their nested
item.items arrays to search for the OSS_SIDEBAR_LABEL. This will ensure the
category label check properly detects non-migrated OSS sections instead of being
dead code.
In `@vercel.json`:
- Line 1648: In the vercel.json file, the redirect configuration at line 1648
still has `permanent: false` which contradicts this PR's objective to make
redirects permanent. Change `permanent: false` to `permanent: true` for this
redirect entry, unless this specific route has a documented reason to remain
temporary (in which case add a comment explaining why it is intentionally exempt
from the permanent redirect requirement).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f1e71084-ab28-4f77-9f21-097cce1e32fd
⛔ Files ignored due to path filters (5)
docs/guides/integrate-with-ory-cloud-through-webhooks.mdxis excluded by!**/*.mdxdocs/kratos/_static/manage-identities/import-user-accounts-identities/pw-migration-webhook-step-1.pngis excluded by!**/*.pngdocs/kratos/_static/manage-identities/import-user-accounts-identities/pw-migration-webhook-step-2.pngis excluded by!**/*.pngdocs/kratos/_static/manage-identities/import-user-accounts-identities/pw-migration-webhook-table.pngis excluded by!**/*.pngdocs/kratos/manage-identities/25_import-user-accounts-identities.mdxis excluded by!**/*.mdx
📒 Files selected for processing (6)
docs/reference/api.jsondocusaurus.config.tssrc/components/OryNetworkCta/ory-network-cta.tsxsrc/theme/TOC/index.csssrc/theme/TOC/index.jsvercel.json
💤 Files with no reviewable changes (1)
- docusaurus.config.ts
Sets all existing redirects to permanent = true
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Summary by CodeRabbit