Add a 15s timeout on requests
This commit is contained in:
parent
ae7b31117b
commit
58097b7c80
|
@ -9,6 +9,7 @@ export default async function handler(req, res) {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: req.body,
|
body: req.body,
|
||||||
|
signal: AbortSignal.timeout(15000),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
|
@ -8,6 +8,7 @@ export default async function handler(req, res) {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: req.body,
|
body: req.body,
|
||||||
|
signal: AbortSignal.timeout(15000),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
Loading…
Reference in New Issue