Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Commit

Permalink
Force Google to use legacy log in page to bypass blockage (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
quanglam2807 authored Dec 18, 2021
1 parent 0b66cd9 commit 95a5888
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/chromeless-helper/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ browser.webRequest.onBeforeSendHeaders.addListener((details) => {

for (let i = 0, l = requestHeaders.length; i < l; i += 1) {
if (requestHeaders[i].name === 'User-Agent') {
requestHeaders[i].value = `${requestHeaders[i].value} Edge/18.18875`;
// remove Chrome version from user-agent string
// allowing the app to work with Google login page
requestHeaders[i].value = requestHeaders[i].value.replace(/Chrome\/[\d.]+/, 'Chrome');
break;
}
}
Expand Down

0 comments on commit 95a5888

Please sign in to comment.