add convex

This commit is contained in:
Aman Varshney
2025-04-28 11:42:11 +05:30
parent 7ef3cfce9e
commit 2a5358a105
70 changed files with 2330 additions and 1139 deletions

View File

@@ -0,0 +1,5 @@
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json({ message: "OK" });
}

View File

@@ -0,0 +1,19 @@
import { NextResponse } from "next/server";
export function middleware() {
const res = NextResponse.next()
res.headers.append('Access-Control-Allow-Credentials', "true")
res.headers.append('Access-Control-Allow-Origin', process.env.CORS_ORIGIN || "")
res.headers.append('Access-Control-Allow-Methods', 'GET,POST,OPTIONS')
res.headers.append(
'Access-Control-Allow-Headers',
'Content-Type, Authorization'
)
return res
}
export const config = {
matcher: '/:path*',
}