Return default request behavior with interceptBufferProtocol


#1

Hey,

I have a single browser window with two webviews.
I want to intercept the https request of one webview and replace the html content, while leaving the other webview to do it’s default behavior.

Here’s the code i’m currently using to intercept the one webview:

protocol.interceptBufferProtocol('https', (req, callback) => {
	let ReUrl = url.parse(req.url, true);

	if(req.url == 'xxx') {
		callback({mimeType: 'text/html', data: Buffer.from(content)})
	}else{
		// default behavior...
	}
})

The intercept is working exactly how I want it, but now the other webview isn’t loading.

How do I return the default behavior of the request?

Thanks