Add a 15s timeout on requests

This commit is contained in:
Hayk Martiros 2022-12-15 08:59:50 -08:00
parent ae7b31117b
commit 58097b7c80
2 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ export default async function handler(req, res) {
method: "POST",
headers: headers,
body: req.body,
signal: AbortSignal.timeout(15000),
});
const data = await response.json();

View File

@ -8,6 +8,7 @@ export default async function handler(req, res) {
method: "POST",
headers: headers,
body: req.body,
signal: AbortSignal.timeout(15000),
});
const data = await response.json();