@upstash/qstash 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,8 +24,8 @@ export function verifySignature(handler, config) {
|
|
|
24
24
|
throw new Error("`Upstash-Signature` header is not a string");
|
|
25
25
|
}
|
|
26
26
|
const body = (await buffer(req)).toString();
|
|
27
|
-
const url = new URL(req.url, `
|
|
28
|
-
console.log({ url });
|
|
27
|
+
const url = new URL(req.url, `https://${req.headers.host}`).href;
|
|
28
|
+
console.log({ reqUrl: req.url, url });
|
|
29
29
|
const isValid = await consumer.verify({ signature, body, url });
|
|
30
30
|
if (!isValid) {
|
|
31
31
|
res.status(400);
|
package/package.json
CHANGED
|
@@ -27,8 +27,8 @@ function verifySignature(handler, config) {
|
|
|
27
27
|
throw new Error("`Upstash-Signature` header is not a string");
|
|
28
28
|
}
|
|
29
29
|
const body = (await (0, micro_1.buffer)(req)).toString();
|
|
30
|
-
const url = new URL(req.url, `
|
|
31
|
-
console.log({ url });
|
|
30
|
+
const url = new URL(req.url, `https://${req.headers.host}`).href;
|
|
31
|
+
console.log({ reqUrl: req.url, url });
|
|
32
32
|
const isValid = await consumer.verify({ signature, body, url });
|
|
33
33
|
if (!isValid) {
|
|
34
34
|
res.status(400);
|