Feature request: Add ability to run Lighthouse reports on logged in pages of app
See original GitHub issueIs your feature request related to a problem? Please describe.
I really like this plugin. One challenge is that most of my app is only available after login. I could have netlify run a lighthouse report on my /login page and my /signup pages but unless there is a mechanism to allow netlify to login or use some kind of token, I’m not able to use the plugin to run reports on most of my app.
Describe the solution you’d like I think there are a few ways it could solved. There could be an environmental variable for a session token or some mechanism to hit an endpoint with a username and password and get a session token so netlify could access post-login pages. Would it be possible to access environmental variables and include them in the config for the paths? if so, maybe I could store the session token in an environmental varibale in netlify and use it as a HTTP header when this plugin accesses a route.
Describe alternatives you’ve considered Setting up puppeteer independent of this plugin to run a lighthouse report. I’d rather use this plugin because then it could trigger on each deploy
Additional context Thank you for any thoughts! I originally posted a question about this on the netlify community board: https://community.netlify.com/t/lighthouse-plugin-reports-for-pages-that-require-login-to-my-app/31639/
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)

Top Related StackOverflow Question
Hi @drewrwilson you can use any key/value for the headers. In your case it should be:
@erezrokah that makes sense, thanks for laying it out. I’ll touch base with the customer to see if we can get a sample repo @drewrwilson whatttt?! Small world indeed 🌏 Would love to hear what public interest tech things you’re up to these days