mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix puppeteer launch in head mode
This commit is contained in:
parent
e75e49a7b4
commit
e866541ae1
3 changed files with 4 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ if (!process.env.VERIFICATION_TOKEN) {
|
|||
app.get('/', async (req, res) => {
|
||||
if (req.query.token !== process.env.VERIFICATION_TOKEN) {
|
||||
console.log('query does not include valid token')
|
||||
res.send(403)
|
||||
res.sendStatus(403)
|
||||
return
|
||||
}
|
||||
await fetchContent(req, res)
|
||||
|
|
@ -23,7 +23,7 @@ app.get('/', async (req, res) => {
|
|||
app.post('/', async (req, res) => {
|
||||
if (req.query.token !== process.env.VERIFICATION_TOKEN) {
|
||||
console.log('query does not include valid token')
|
||||
res.send(403)
|
||||
res.sendStatus(403)
|
||||
return
|
||||
}
|
||||
await fetchContent(req, res)
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ const getTweetIds = async (
|
|||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath: process.env.CHROMIUM_PATH,
|
||||
headless: process.env.LAUNCH_HEADLESS === 'true',
|
||||
headless: !!process.env.LAUNCH_HEADLESS,
|
||||
defaultViewport: {
|
||||
width,
|
||||
height,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ const getBrowserPromise = (async () => {
|
|||
].filter((item) => !!item),
|
||||
defaultViewport: { height: 1080, width: 1920 },
|
||||
executablePath: process.env.CHROMIUM_PATH,
|
||||
headless: process.env.LAUNCH_HEADLESS === 'true',
|
||||
headless: !!process.env.LAUNCH_HEADLESS,
|
||||
timeout: 120000, // 2 minutes
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue