From 02ad8fcd5fe5fd047daf5cdfe76c82ecc41ba724 Mon Sep 17 00:00:00 2001 From: Shane Gannon Date: Thu, 27 Oct 2022 08:18:07 +0100 Subject: [PATCH] docs: correcting main example in WebRequest documentation (#36113) Correcting main example The entry `*://electron.github.io` is invalid and produces an exception. i.e. > UnhandledPromiseRejectionWarning: TypeError: Invalid url pattern *://electron.github.io: Empty path. Setting a valid path to resolve this issue --- docs/api/web-request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-request.md b/docs/api/web-request.md index 9f3e4347cc..b695cfbaf6 100644 --- a/docs/api/web-request.md +++ b/docs/api/web-request.md @@ -28,7 +28,7 @@ const { session } = require('electron') // Modify the user agent for all requests to the following urls. const filter = { - urls: ['https://*.github.com/*', '*://electron.github.io'] + urls: ['https://*.github.com/*', '*://electron.github.io/*'] } session.defaultSession.webRequest.onBeforeSendHeaders(filter, (details, callback) => {