Open chenxicore opened 3 months ago
Host header is in the requestWillBeSentExtraInfo event and Puppeteer does not extract it.
As far as I understand, requestWillBeSentExtraInfo is an additional event that is not available on all requests... so we can't exactly wait around until receiving requestWillBeSentExtraInfo to send the request details. I suspect what we could do is add an additional PageEvent of 'requestWithExtraInfo' that forwards the extra info... and then let the user marry the two on their own?
requestWillBeSentExtraInfo is emitted if the request actually reaches the network service and some headers can only be known at that stage (due to security concerns and probably due to availability of the data, e.g., host is probably only resolved once the request is really going to the wire).
Minimal, reproducible example
Background
When I intercept the request, I cannot find the host in the headers, but I can see it after devtools is opened.
Expectation
I hope that host and other information can be written in the headers when intercepting the request.
Reality
Intercepting the request cannot find the host in the headers
Puppeteer configuration file (if used)
No response
Puppeteer version
22.8.1
Node version
v20.13.1
Package manager
npm
Package manager version
10.5.2
Operating system
Windows