aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.js')
-rw-r--r--src/models/Service.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index 848a84aa2..2303512af 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -177,11 +177,15 @@ export default class Service {
177 } 177 }
178 178
179 @computed get userAgent() { 179 @computed get userAgent() {
180 let userAgent = window.navigator.userAgent; 180 let { userAgent } = window.navigator;
181 if (typeof this.recipe.overrideUserAgent === 'function') { 181 if (typeof this.recipe.overrideUserAgent === 'function') {
182 userAgent = this.recipe.overrideUserAgent(); 182 userAgent = this.recipe.overrideUserAgent();
183 } 183 }
184 184
185 // Remove Ferdi as it can cause incompatabilities with services.
186 // This way, Ferdi will look like a normal Chrome instance
187 userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, '');
188
185 return userAgent; 189 return userAgent;
186 } 190 }
187 191