chore: temp is allowed

This commit is contained in:
Ephraim Atta-Duncan
2024-10-23 19:13:00 +00:00
parent 098d6fda24
commit 772fb4cbf5

View File

@@ -45,15 +45,15 @@ export function requestHandler<T = Record<string, string | string[]>>(
): RouteHandler<T> { ): RouteHandler<T> {
return async (req: NextRequest, ctx: { params: T }) => { return async (req: NextRequest, ctx: { params: T }) => {
try { try {
if (!isAllowedOrigin(req)) { // if (!isAllowedOrigin(req)) {
return NextResponse.json( // return NextResponse.json(
{ error: 'Forbidden' }, // { error: 'Forbidden' },
{ // {
status: 403, // status: 403,
headers: CORS_HEADERS, // headers: CORS_HEADERS,
}, // },
); // );
} // }
const response = await handler(req, ctx); const response = await handler(req, ctx);