Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: should not redirect when page is visited by bot #1330

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Conversation

chenjiahan
Copy link
Member

Summary

When the request comes from a bot (such as Google's crawler), Rspress should not redirect the page.

This change should fix the "Page with redirect" warning of Google:

image

The RegExp is referenced from https://www.npmjs.com/package/isbot

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Aug 14, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 7d7de40
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/66bcb6c5f9cb72000862c279
😎 Deploy Preview https://deploy-preview-1330--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87 (🔴 down 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@zoolsher zoolsher left a comment

Choose a reason for hiding this comment

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

LGTM

@zoolsher zoolsher merged commit 964f4dd into main Aug 15, 2024
7 checks passed
@zoolsher zoolsher deleted the bot_redirect_0814 branch August 15, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants