We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 961a75c commit adb39bcCopy full SHA for adb39bc
src/main/index.ts
@@ -53,6 +53,17 @@ function bootsharp() {
53
54
registerUpdater()
55
56
+ //remove Electron, Follow from user agent
57
+ session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
58
+ let userAgent = details.requestHeaders["User-Agent"]
59
+ if (userAgent) {
60
+ userAgent = userAgent.replace(/\s?Electron\/[\d.]+/, "")
61
+ userAgent = userAgent.replace(/\s?Follow\/[\d.a-zA-Z-]+/, "")
62
+ }
63
+ details.requestHeaders["User-Agent"] = userAgent
64
+ callback({ cancel: false, requestHeaders: details.requestHeaders })
65
+ })
66
+
67
app.on("activate", () => {
68
// On macOS it's common to re-create a window in the app when the
69
// dock icon is clicked and there are no other windows open.
0 commit comments