Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Description

Fixes incorrect redirect for the Lazer docs. Previously, visiting /lazer redirected to /price-feeds/pro but was then immediately caught by the generic price-feeds catch-all and redirected to /price-feeds/core/pro, which is incorrect.

This changes the catch-all redirect regex in next.config.js to also exclude the exact pro path as well as its subtree, ensuring that:

  • /lazer → /price-feeds/pro (308) and stays there
  • /price-feeds/pro and /price-feeds/pro/* are not rewritten to /price-feeds/core/…

Change:

  • From: ["/price-feeds/:path((?!core/|pro/).*)", "/price-feeds/core/:path"]
  • To: ["/price-feeds/:path((?!core/|pro(?:/|$)).*)", "/price-feeds/core/:path"]

Order of redirects for Lazer remains before the generic price-feeds redirects.

Local validation with dev server:

  • /lazer → 308 → /price-feeds/pro
  • /price-feeds/pro → 200 OK (no further redirect)
  • /price-feeds/core/pro → 404 (as expected)

Type of Change

  • Update links/references
  • New Page
  • Page update/improvement
  • Fix typo/grammar
  • Restructure/reorganize content
  • Other (please describe): Adjust redirect regex in Next.js config

Areas Affected

  • next.config.js redirects
  • Affects navigation for:
    • /lazer and /lazer/*
    • /price-feeds/lazer and /price-feeds/lazer/*
    • Ensures /price-feeds/pro and /price-feeds/pro/* are excluded from the generic catch-all redirect

Checklist

  • I ran pre-commit run --all-files to check for linting errors
  • I have reviewed my changes for clarity and accuracy
  • All links are valid and working
  • Images (if any) are properly formatted and include alt text
  • Code examples (if any) are complete and functional
  • Content follows the established style guide
  • Changes are properly formatted in Markdown
  • Preview renders correctly in development environment

Additional local checks:

  • Ran npm run lint (only pre-existing warnings unrelated to this change)
  • Verified redirects via curl on dev server

Related Issues

Closes: N/A (Fix for issue reported in Slack thread)

Additional Notes

  • This fix relies on both the ordering of the Lazer redirects and the refined negative lookahead. Reviewer should confirm no other redirect rules conflict or preempt these.
  • Behavior validated locally; preview deploy should be checked to confirm parity.

Link to Devin run: https://app.devin.ai/sessions/390333d88c854ceba631ba2b9185c5fc
Requested by: Jayant ([email protected]), GitHub: @jayantk

Contributor Information

  • Name: Devin
  • Email: n/a

Screenshots

N/A (verified via curl against local dev server)

@devin-ai-integration
Copy link
Contributor Author

Prompt hidden (unlisted session)

@vercel
Copy link

vercel bot commented Oct 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 22, 2025 1:10pm
documentation Building Building Preview Oct 22, 2025 1:10pm

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@aditya520 aditya520 merged commit e0e3026 into main Oct 22, 2025
4 of 5 checks passed
@aditya520 aditya520 deleted the devin/1761138430-fix-lazer-redirect branch October 22, 2025 14:20
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.

1 participant