-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip "production" audits when in development #3228
Comments
It would also be nice to have some type of option to skip https audits when testing on localhost. For example, I've got a super-simple PWA in development with 4 https-related failures. At this point, I really don't care about https failures — because they should be resolved on the production server. So, instead of having to figure out why I'm not getting a 100 when testing on localhost, I'd prefer a command to the effect of In keeping with @kaycebasques' comment, I would add a comment at the end of the CLI feedback and on the Lighthouse Report indicating that https audits were skipped on localhost. I would also allow the flag to only work on a localhost, 127.x.x.x, 192.168.x.x urls. |
beyond just https there are several audits that only make sense in the context of a production deployment that it would be nice to have an all-encompassing "dev mode" where only audits that make sense to run during development would be run and we'd inject placeholders for the production checks so there are no surprises later |
Could use #1512 to surface some of these warnings. |
I have created the tool lighthouse-ignore that may help. |
Since this issue was filed, we made insecure https localhost a fatal error (but are considering reverting that here: #8865). We then want to create an insecure https audit if This issue requests a way to silence audits that fail due to common and expected differences in development vs production environments. FWIW, this is already possible with a custom config (just extend the default and turn off what you don't like). We could support this pretty easily with a |
http/https checks should be much better now on localhost. I'll leave this issue open to track |
#11766 handled a lot (all?) of these cases. So, let's close. |
I think core(url): redirects-http => n/a for localhost. refactor url special cases by paulirish · #11766 sorted this out. redirects-http, uses-http2, is-on-https are the key ones. but yeah i think they're all good now. |
localhost
is considered a secure origin, right? So people who only audit their page vialocalhost
will get false positives on the "Uses HTTPS" audit?Something like this could be helpful:
"It looks like you're running your page locally. The results of this audit may change when you deploy your site to its production URL. To ensure that your page really does use HTTPS, make sure to audit this page again, using the production URL."
Generally speaking, it may be worthwhile to have just one top-level warning about
localhost
, and a reminder about the need to audit the production URL.The text was updated successfully, but these errors were encountered: