fix(my): render /my dynamically so Clerk auth() can read headers - #267
Merged
Conversation
Switch /my from ISR (revalidate) to force-dynamic. auth() reads request headers, which threw DYNAMIC_SERVER_USAGE under static generation in a production build (signed-in only; middleware redirects signed-out users before the page runs). Also removes the temporary diagnostic logging. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hackhq | a7dffbf | Commit Preview URL Branch Preview URL |
Aug 13 2026, 03:50 PM |
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.
Summary
/myfor signed-in users./myusedexport const revalidate = 3600(ISR) whileauth()reads requestheaders(). In a production build these conflict andheaders()throwsDYNAMIC_SERVER_USAGE, surfacing as a sanitized Server Components 500. Signed-out users were unaffected because middleware redirects them before the page runsauth()./mytoexport const dynamic = "force-dynamic", matching/authand/api/tracker. Per-request rendering also keeps deadline-derived countdowns fresh (the original reason#47setrevalidate).Test plan
main; confirm Workers Builds deploys production.wrangler tail hackhqrunning, sign in via GitHub and land on/myin incognito.GET /myreturns Ok, noDYNAMIC_SERVER_USAGE, hub renders.GET /api/trackerreturns 401.Made with Cursor