mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-26 16:49:11 -04:00
Only set OAuth user-agent for GitHub (Fixes #1816)
This commit is contained in:
1 parent
6932cf6dc6
commit
6efe7d17ca
1 file changed
+11
-4
@@ -99,11 +99,18 @@ export function authorizeUserInWindow(
|
||||
_parseUrl(url);
|
||||
});
|
||||
|
||||
const options = {};
|
||||
|
||||
// Force user-agent for GitHub until we update Chromium version. Note, we don't do this for
|
||||
// everything because it breaks things. https://github.com/getinsomnia/insomnia/issues/1816
|
||||
if (url.includes('github.com')) {
|
||||
options.userAgent =
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, ' +
|
||||
'like Gecko) Chrome/78.0.3904.108 Safari/537.36';
|
||||
}
|
||||
|
||||
// Show the window to the user after it loads
|
||||
child.on('ready-to-show', child.show.bind(child));
|
||||
child.loadURL(url, {
|
||||
userAgent:
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',
|
||||
});
|
||||
child.loadURL(url, options);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user