Sending Request Header by Domain
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.
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.
@shaqb https://bugs.chromium.org/p/chromium/issues/detail?id=1229598
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!
Closing since there's nothing we can do in sitespeed.io until Chrome/Firefox implements it.