blomqma / next-rest-framework

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

Add support for allowing and denying paths #65

Closed blomqma closed 1 year ago

blomqma commented 1 year ago

This change adds two new config options for specifying which routes or API routes are used by Next REST Framework. Developers can not allow and deny specific routes or use wildcards for more global allow/deny rules. This change achieves a better compability with other API routes and server-side libraries not defined with next NRF.

The appDirPath and apiRoutesPath config options now also have stricter typings, preventing typos in the configuration. The framework also now gracefully logs a warning if a developer uses either of those options and the app directory or the pages directory is not found.

The ignored routes are also logged by the framework for better developer experience.

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
next-rest-framework 🛑 Canceled (Inspect) Sep 27, 2023 0:28am
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 0:28am