fix: move onParse to root and support trailing slash in webhook route

This commit is contained in:
Your Name committed 2026-06-12 23:37:18 -04:00
1 parent ee1c7820c3
commit 32e9fd5ac6
2 files changed
+62 -59

No files matched your search

+5
View File
@@ -29,6 +29,11 @@ const CORS_ORIGIN = process.env.CORS_ORIGIN || "http://localhost:5173";
const JWT_SECRET = process.env.JWT_SECRET || "homaroma_secret_2026_scent";
const app = new Elysia()
.onParse(async ({ request }) => {
if (request.url.includes('/api/line/webhook')) {
return await request.text();
}
})
.use(
cors({
origin: [