diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 000000000..0a8832395 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,6 @@ +allowBuilds: + '@prisma/client': true + '@prisma/engines': true + bcrypt: true + esbuild: true + prisma: true diff --git a/src/components/CourseView.tsx b/src/components/CourseView.tsx index 0646bc81f..8a4027c38 100644 --- a/src/components/CourseView.tsx +++ b/src/components/CourseView.tsx @@ -40,7 +40,7 @@ export const CourseView = ({ return (
-
+
=> { }; export const withMobileAuth = async (req: RequestWithUser) => { - if (req.headers.get('Auth-Key')) { - return NextResponse.next(); + + const authKey=req.headers.get('Auth-Key'); + + if (authKey && authKey===process.env.APPX_AUTH_KEY) { + const newHeaders = new Headers(req.headers); + newHeaders.delete('g'); + return NextResponse.next({ + request: { + headers: newHeaders, + }, + }); } const token = req.headers.get('Authorization');