Open robingustafsson opened 3 years ago
Relatedly, I think this should be exposed on Page as well.
@tom-miseur: This is essentially a way to intercept requests before they get sent, which is useful for setting URL/route-specific headers. With page.setExtraHttpHeaders. You often run into CORS issues as the headers are applied across all requests.
Wondering if this will also be useful in intercepting requests to favico and aborting them so the logs are not filled with 404s for those calls ;)
Add support for
BrowserContext.route(url, handler[, options])
, to enable request interception allowing any request initiated in the browser context to be modified. A request with a matching URL will stall until continued, fulfilled or aborted.Relevant links:
Tasks:
Route
in the mapping layer.