I'm trying to run Lighthouse on my website from the command line.
When Chrome browser opens it comes without any cookies, therefore the desired page isn't loaded and instead I get my login page.
I tried to use --extra-headers flag when running lighthouse with a cookie, but I'm not sure this is the right way (and if so, what should be come inside "Cookie" attribute)
Running Lighthouse with:
lighthouse SITE_URL --output json --output-path ./report.json --extra-headers=./headers.json
And the headers.json file is:
{
"Cookie": "Username=my_username; Password:my_password;"
}
Is that the right way to insert a cookie for loading a website ?
If so, what is the right syntax for custom cookies?
To view the right syntax for the cookie, I logged in and copied the Session value for logging in.
{
"Cookie": "mySession=SESSION_HASH;"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With