blomqma / next-rest-framework

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

Fix infinite request loop with pages router #78

Closed blomqma closed 11 months ago

blomqma commented 11 months ago

This fixes a bug that caused an infinite request loop when using pages router and the docs endpoint was not ignored by the OpenAPI path generation.

This fix also allows defining multiple different docs endpoints, although that should be a rare case. The request protocol parsing is also now handled differently with pages router and cases where the protocol headers contain multiple protocols should be handled now.

vercel[bot] commented 11 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 Oct 15, 2023 2:56pm
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2023 2:56pm