Files
blog/frontend/server/routes/admin.get.ts
T

10 lines
366 B
TypeScript
Raw Normal View History

2026-09-11 11:25:14 +02:00
/**
* Vanity redirect to the PocketBase admin UI, whose own route is fixed at
* `/_/`. Handled here (not in Caddy) so it works the same in dev, where
* Caddy isn't in the stack, and in production.
*/
export default defineEventHandler((event) => {
const { public: config } = useRuntimeConfig()
return sendRedirect(event, `${config.pocketbaseUrl}/_/`, 302)
})