sitespeed.io icon indicating copy to clipboard operation
sitespeed.io copied to clipboard

Sending Request Header by Domain

Open shaqb opened this issue 3 years ago • 3 comments

Your question

Background In our organisation we're rolling out sitespeed.io to the majority of our feature teams. As part of our observability approach we have an APM (application performance monitoring) tool instrumenting our backend applications so we can deep dive into performance issues.

When we run sitespeed.io tests and we see a very long TTFB from our main domain, this is highly indicative of a backend performance issue. However it's hard for us to see the sitespeed.io request from the numerous other requests that we see.

Our APM supports the filtering of URLs by a request header, which sitespeed.io supports. So the idea would be, we can add a header like 'x-pagespeed:sitespeed.io' to our sitespeed.io requests and then we could add this filter to our APM to isolate the sitespeed.io request.

Sitespeed.io currently allows us to send a custom request header (--browsertime.requestheader), which is great. However our internal security team block requests containing non standard request headers to any subdomain that we have. These subdomains hosts our static content, which means if we pass a request header to all assets, none of our static assets get downloaded and our sitespeed.io tests effectively fail.

The Question Is there a way to send only a request header to a specific domain? Our security team will allow this for the top level domain and this in turn will allow us to filter in our APM.

shaqb avatar Jul 25 '22 06:07 shaqb

Hi @shaqb no I don't think that is doable today. For Chrome we use https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setExtraHTTPHeaders and there's no way there to set that info specific for one domain.

soulgalore avatar Jul 29 '22 20:07 soulgalore

@shaqb https://bugs.chromium.org/p/chromium/issues/detail?id=1229598

soulgalore avatar Aug 10 '22 17:08 soulgalore

Hey @soulgalore - sorry for the delay. I was on vacation and I'm under strict instructions not to work!

Thanks for the chromium link. I'll keep an eye on that!

shaqb avatar Aug 16 '22 06:08 shaqb

Closing since there's nothing we can do in sitespeed.io until Chrome/Firefox implements it.

soulgalore avatar Dec 27 '23 15:12 soulgalore