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: private docs should not redirect to customer directly #1193

Merged
merged 5 commits into from
Jul 25, 2024

Conversation

abvthecity
Copy link
Contributor

@abvthecity abvthecity commented Jul 25, 2024

Fixes FER-2612

This PR introduces a /api/fern-docs/redirect route that handles the first layer of redirection between getStaticProps -> a customer's endpoint. During on demand ISR, a burst of HEAD requests will target this api route instead.

Context: https://buildwithfern.slack.com/archives/C05E0S0A9SN/p1721930265139799

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fern-dashboard-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 5:40pm
fern-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 5:40pm
fern-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 5:40pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
fern-dashboard ⬜️ Ignored (Inspect) Jul 25, 2024 5:40pm
fontawesome-cdn ⬜️ Ignored (Inspect) Visit Preview Jul 25, 2024 5:40pm
private-docs ⬜️ Ignored (Inspect) Jul 25, 2024 5:40pm

Copy link

linear bot commented Jul 25, 2024

FER-2612 [Propexo] Do not hammer propexo's app server when private docs are turned on

This appears to be a quirk in how nextjs handles server-side generation: when ISR'ing pages that redirect to another page, it sends a HEAD request to the redirect target.

When revalidating, we hit propexo's docs with a burst of 1,200 requests which overwhelms their server

@abvthecity abvthecity merged commit f275b2c into main Jul 25, 2024
21 checks passed
@abvthecity abvthecity deleted the ajiang/private-docs-redirect branch July 25, 2024 18:21
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.

2 participants