Repository navigation
docs: clarify route-scoped middleware example path - #4445
Conversation
|
@BTF-Kabir-2020 is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe routing documentation now uses a non- ChangesMiddleware documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
Use a non-middleware handler path in the handlers examples and note that middleware auto-scan only applies when serverDir is set. Fixes nitrojs#4354
ef88973 to
6840a50
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Update the route-scoped middleware
handlersexamples to use./server/utils/api-auth.tsinstead of./server/middleware/api-auth.ts, and clarify thatmiddleware/auto-registration only happens whenserverDiris set.Fixes #4354
Why this approach
@pi0 noted on the issue / prior PRs that auto-scanning is opt-in via
serverDir, so earlier wording that treatedmiddleware/as always-global was inaccurate.This PR:
middleware/to avoid reader confusionserverDirwhere auto-registration is describedmiddleware/whenserverDiris enabledNotes
docs/1.docs/5.routing.md