github-actions
released this
27 Oct 15:54
·
55 commits
to main
since this release
Minor Changes
-
11ed32f: Add experimental custom server middleware. Useful for custom logic when protecting your API routes.
Example usage:
// server/middleware/clerk.ts import { clerkMiddleware } from "vue-clerk/server"; export default clerkMiddleware((event) => { const { auth } = event.context; if (!auth.userId && event.path.startsWith("/api")) { throw createError({ statusCode: 401, message: "Unauthorized", }); } });