Skip to content

Commit f2bdc02

Browse files
committed
Update flags, block media
1 parent 7070f4c commit f2bdc02

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

server.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ const server = prerender({
2121
'--metrics-recording-only',
2222
'--no-first-run',
2323
'--safebrowsing-disable-auto-update',
24-
'--blink-settings=imagesEnabled=false'
24+
'--blink-settings=imagesEnabled=false',
25+
'--no-pings'
2526
],
26-
pageLoadTimeout: 20000,
27+
pageLoadTimeout: 10000,
2728
waitAfterLastRequest: parseInt(process.env.WAIT_AFTER_LAST_REQUEST, 10) || 200,
2829
pageDoneCheckInterval: 50,
2930
chromeRefreshRate: 100
@@ -59,6 +60,11 @@ const BLOCKED_PATTERNS = [
5960
/\/hub\?/,
6061
/eventsource/i,
6162
/livereload/,
63+
/youtube\.com/,
64+
/googlevideo\.com/,
65+
/ytimg\.com/,
66+
/\.(mp4|webm|ogv|mp3)(\?|$)/,
67+
/\.(png|jpg|jpeg|gif|svg|ico)(\?|$)/,
6268
];
6369

6470
// Patterns for requests that should be ignored in requestsInFlight count
@@ -162,8 +168,9 @@ server.use({
162168
}
163169
});
164170

171+
165172
server.use(prerender.removeScriptTags());
166-
server.use(memoryCache);
173+
//server.use(memoryCache);
167174

168175
const RESTART_INTERVAL = 24 * 60 * 60 * 1000;
169176
const startedAt = Date.now();

0 commit comments

Comments
 (0)