diff --git a/src/controllers/upcoming/titles/index.ts b/src/controllers/upcoming/titles/index.ts index c4ee5d9..c4311af 100644 --- a/src/controllers/upcoming/titles/index.ts +++ b/src/controllers/upcoming/titles/index.ts @@ -16,9 +16,11 @@ import { getUpcomingTitlesFromAnilist } from "./anilist"; const app = new Hono(); app.post("/titles", async (c) => { + console.log(c.req.path); if ( !(await verifyQstashHeader( env(c, "workerd"), + c.req.path, c.req.header("Upstash-Signature"), await c.req.text(), )) diff --git a/src/libs/qstash/verifyQstashHeader.ts b/src/libs/qstash/verifyQstashHeader.ts index d61aa63..d7efaa9 100644 --- a/src/libs/qstash/verifyQstashHeader.ts +++ b/src/libs/qstash/verifyQstashHeader.ts @@ -4,6 +4,7 @@ import type { Env } from "~/types/env"; export function verifyQstashHeader( env: Env, + route: string, signature: string | undefined, body: string, ): Promise { @@ -19,6 +20,6 @@ export function verifyQstashHeader( return receiver.verify({ body, signature, - url: "https://aniplay-v2.rururu.workers.dev", + url: `https://aniplay-v2.rururu.workers.dev${route}`, }); }