From 7b6e3d61c9dae68a45758323cfd952d2b8098800 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Wed, 21 Aug 2024 07:55:31 +0200 Subject: [PATCH] docs: example for lighthouse using headers --- docs/documentation/sitespeed.io/lighthouse/index.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/documentation/sitespeed.io/lighthouse/index.md b/docs/documentation/sitespeed.io/lighthouse/index.md index 0512d62b0..8e49b2139 100644 --- a/docs/documentation/sitespeed.io/lighthouse/index.md +++ b/docs/documentation/sitespeed.io/lighthouse/index.md @@ -53,10 +53,17 @@ module.exports = { }; ``` -You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```. +You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```. If you pass on command like flags that contains hyphens, they are removed and converted internally in Lighthouse, so for example to get the command line flag `--extra-headers` to work, the JSON should be like this: + +```JSON +{ + "extraHeaders": { "key": "value"} +} +``` Read all about configuring Lighthouse at [https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md). + ## Disable GPSI If you only want to run Lighthouse and not GPSI you can disable it with `----plugins.remove @sitespeed.io/plugin-gpsi`.