chore: kanban template
This commit is contained in:
14
packages/functions/src/middleware/cors.middleware.ts
Normal file
14
packages/functions/src/middleware/cors.middleware.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { addHTTPMiddleware } from '@pikku/core/http'
|
||||
import { cors } from '@pikku/core/middleware'
|
||||
|
||||
// The Better Auth session-bridge middleware (betterAuthSession) is generated and
|
||||
// registered globally by the pikku CLI from src/wirings/auth.ts — see
|
||||
// src/scaffold/auth.gen.ts — so it is NOT wired here. This file only configures
|
||||
// CORS for the browser client.
|
||||
addHTTPMiddleware('*', [
|
||||
cors({
|
||||
origin: true,
|
||||
credentials: true,
|
||||
headers: ['Content-Type', 'Authorization', 'X-Auth-Return-Redirect'],
|
||||
}),
|
||||
])
|
||||
Reference in New Issue
Block a user