blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
134 stars 17 forks source link

Fix dynamic server usage in app router docs route #168

Closed blomqma closed 3 months ago

blomqma commented 3 months ago

Currently in the app router docs route we read the request headers directly from the original request object. This is problematic because it leads to a dynamic server usage error unless the docs endpoint is explicitly set to force-dynamic caching strategy. By reading the headers from a cloned request object the docs endpoint can be used with the default caching strategy, fixing this issue.

vercel[bot] commented 3 months ago

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

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 10:28am
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 10:28am