fix: move onParse to root and support trailing slash in webhook route
This commit is contained in:
1 parent
ee1c7820c3
commit
32e9fd5ac6
2 files changed
+62
-59
No files matched your search
@@ -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: [
|
||||
|
||||
Reference in new issue
Block a user