fix: url incorrect when verifying QStash header

This commit is contained in:
2024-09-10 22:34:43 -04:00
parent c532507b0f
commit 47b58c34d8

View File

@@ -21,7 +21,9 @@ export async function verifyQstashHeader(
return await receiver.verify({ return await receiver.verify({
body: await req.text(), body: await req.text(),
signature, signature,
url: req.url, url: req.url.startsWith("http://localhost")
? req.url
: req.url.replace("http://", "https://"),
}); });
} catch (error) { } catch (error) {
if (error instanceof SignatureError) { if (error instanceof SignatureError) {