How to overwrite the User-Agent Client Hints in puppeteer?
I am facing an issue with dealing with the user-agent-client-hints. If you have no idea what User-agent-client-hints are then think of them as some request headers. (See the image below)
I tried to overwrite the request headers with the code below but it does not work
await page.setRequestInterception(true)
await page.on('request', (req) => {
const headers = req.headers()
headers['sec-ch-ua'] = 'some thing new'
req.continue({
headers
})
})
Comments
Post a Comment