Add requestheaders and cookie info to prewarm server. (#4259)

https://github.com/sitespeedio/sitespeed.io/issues/4258
This commit is contained in:
Peter Hedenskog 2024-08-21 20:17:45 +02:00 committed by GitHub
parent 7b6e3d61c9
commit 70447cfeec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,14 @@ async function preWarmServer(urls, options, scriptOrMultiple) {
headless: options.headless
};
if (options.requestheader) {
preWarmOptions['requestheader'] = options.requestheader;
}
if (options.cookie) {
preWarmOptions['cookie'] = options.cookie;
}
if (options.android.enabled) {
preWarmOptions.android = options.android;
const chromeDevice = get(options, 'chrome.android.deviceSerial');