From 072e44e536e2a73b49ea0cd8247a4a47c66c5a68 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 11 Jun 2020 13:08:37 +0200 Subject: [PATCH] MOBILE-3401: Set custom User-Agent for http plugin --- src/providers/ws.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/providers/ws.ts b/src/providers/ws.ts index 996d3e61f..4e37fdd89 100644 --- a/src/providers/ws.ts +++ b/src/providers/ws.ts @@ -158,6 +158,10 @@ export class CoreWSProvider { protected mimeUtils: CoreMimetypeUtilsProvider, logger: CoreLoggerProvider) { this.logger = logger.getInstance('CoreWSProvider'); + + if (this.appProvider.isMobile()) { + ( cordova).plugin.http.setHeader('User-Agent', navigator.userAgent); + } } /**