fix: bypass options preflight

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-04-20 21:33:34 +08:00
parent 17893543a8
commit 845b307443

View File

@@ -63,6 +63,9 @@ export class ServerlessController {
@Request() req: FastifyRequest,
@Response() reply: FastifyReply,
) {
if (req.method === 'OPTIONS') {
return reply.send()
}
return this.runServerlessFunction(param, isAuthenticated, req, reply)
}