Add robots.txt and bypass auth middleware for public assets#151
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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.
M5 — robots.txt
Adds
public/robots.txtso search engines crawl the marketing site and skip authed/onboarding routes.//app/,/api/,/onboarding/,/welcome/https://nextsurplus.com/sitemap.xml(aspirational; sitemap.xml not yet built)M4a — Middleware bypass for public assets
Extends the static-asset early-return in
src/proxy.tsso social crawlers (Twitter/X, Facebook, LinkedIn, Slack, iMessage) and PWA manifest fetchers can reach these without hitting the auth gate or host-split redirect:/apple-touch-icon.png/android-chrome-*.png/manifest.json/og-image.png/robots.txtExisting bypasses (
/_next,/api/,/auth/callback,/images/,/brand/,/favicon*) untouched.Test plan
After preview deploys, verify each returns 200 (not 308/302):
curl -I <preview>/robots.txtcurl -I <preview>/favicon.icocurl -I <preview>/og-image.pngcurl -I <preview>/manifest.json