Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Setting host request header via Fetch #20

Open
imranazad opened this issue Sep 5, 2019 · 0 comments
Open

Setting host request header via Fetch #20

imranazad opened this issue Sep 5, 2019 · 0 comments

Comments

@imranazad
Copy link

imranazad commented Sep 5, 2019

It turns out it's no longer possible to set host request header via Fetch.continueRequest:

browser.on('Fetch.requestPaused', (params) => { 
            var headers = [
                    {'name': 'Host', value: '1' }
                ]

            browser.cdp('Fetch', 'continueRequest', {
                requestId: params.requestId,
                headers: headers
            })
         })

It turns out because chromium has now marked this as an unsafe header:

https://github.com/chromium/chromium/blob/d280a10b60101c5eacd4e130110aec74a633ab79/services/network/public/cpp/header_util.cc#L22

Any ideas of how I can get around this?

Thanks

@imranazad imranazad changed the title Setting request header via Fetch Setting host request header via Fetch Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant