Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome update from v71 to v72 broke request interception inside cross-domain iframes #36

Open
jwray1 opened this issue Feb 15, 2019 · 0 comments

Comments

@jwray1
Copy link

jwray1 commented Feb 15, 2019

Here's some minimal code to demonstrate the problem. In chrome 71, every request is intercepted and printed. In chrome 72, requests inside cross domain iframes do not even get to "Hello World"

import pychrome
REQUEST_INTERCEPT_PATTERNS = [{"urlPattern": "*", "interceptionStage": "HeadersReceived"}]
def request_intercepted(interceptionId, request, **kwargs):
    print('HELLO WORLD')
    body = tab.Network.getResponseBodyForInterception(interceptionId=interceptionId)['body']
    print(body)
    tab.Network.continueInterceptedRequest(interceptionId=interceptionId)
    

if __name__ == '__main__':
    browser = pychrome.Browser(url="http://127.0.0.1:9200")
    tab = browser.list_tab()[0]
    tab.Network.requestIntercepted = request_intercepted
    tab.start()
    tab.Page.enable()
    print(tab.Network)
    tab.Network.setRequestInterception(patterns=REQUEST_INTERCEPT_PATTERNS)
@jwray1 jwray1 changed the title Chrome update from v71 to v72 broke request interception apparently Chrome update from v71 to v72 broke request interception inside cross-domain iframes Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant