MOBILE-3401: Set custom User-Agent for http plugin

main
Noel De Martin 2020-06-11 13:08:37 +02:00
parent f63b6187fb
commit 072e44e536
1 changed files with 4 additions and 0 deletions

View File

@ -158,6 +158,10 @@ export class CoreWSProvider {
protected mimeUtils: CoreMimetypeUtilsProvider, protected mimeUtils: CoreMimetypeUtilsProvider,
logger: CoreLoggerProvider) { logger: CoreLoggerProvider) {
this.logger = logger.getInstance('CoreWSProvider'); this.logger = logger.getInstance('CoreWSProvider');
if (this.appProvider.isMobile()) {
(<any> cordova).plugin.http.setHeader('User-Agent', navigator.userAgent);
}
} }
/** /**