diff --git a/pages/api/sources/upcloud.js b/pages/api/sources/upcloud.js index 6d9771a..1ae97be 100644 --- a/pages/api/sources/upcloud.js +++ b/pages/api/sources/upcloud.js @@ -87,7 +87,7 @@ export default async function handler(req, res) { } catch (error) { return res.status(500).end(`Server Error,check the params.`) } - await page.close(); + await browser.close(); // Response headers. res.setHeader('Cache-Control', 's-maxage=10, stale-while-revalidate') diff --git a/pages/api/sources/vidcloud.js b/pages/api/sources/vidcloud.js index a861623..dffdf8b 100644 --- a/pages/api/sources/vidcloud.js +++ b/pages/api/sources/vidcloud.js @@ -89,7 +89,7 @@ export default async function handler (req, res) { } catch (error) { return res.status(500).end(`Server Error,check the params.`) } - await page.close(); + await browser.close(); // Response headers. res.setHeader('Cache-Control', 's-maxage=10, stale-while-revalidate')