Problems with opengraph-image when using precompute
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 622
- Forks
- 87
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 14
Description
The pattern described for the middleware in the docs https://flags-sdk.dev/frameworks/next/precompute#2-precompute-flags-in-middleware breaks opengraph-image URL generation.
Basically, the URL generated by Next for opengraph-image already includes the JWT flags because it uses the rewritten URL, but the middleware adds the JWT flag again to the URL, which makes the route not match to anything.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented precompute middleware pattern at flags-sdk.dev/frameworks/next/precompute#2-precompute-flags-in-middleware and reproduce the failure using the linked next-flags-sdk-bug-repro. Trace opengraph-image URL generation and the middleware rewrite to identify the duplicated JWT flag; done means the generated route matches successfully with a single JWT flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100