From ef58cc9e32c610b588ce8f6ab87f4febba9b2a54 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 24 Dec 2019 13:49:18 +0100 Subject: [PATCH] Support for username/password in camera URLs if authentication is required --- .../http/static/js/plugins/camera.android.ipcam/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platypush/backend/http/static/js/plugins/camera.android.ipcam/index.js b/platypush/backend/http/static/js/plugins/camera.android.ipcam/index.js index 7b0f57d90..30695cd7a 100644 --- a/platypush/backend/http/static/js/plugins/camera.android.ipcam/index.js +++ b/platypush/backend/http/static/js/plugins/camera.android.ipcam/index.js @@ -85,6 +85,11 @@ Vue.component('camera-android-ipcam', { if (cam[attr].startsWith('https://')) { cam[attr] = cam[attr].replace('https://', 'http://'); } + + if (cam[name] in this.config && this.config[cam[name]].username) { + cam[attr] = 'http://' + this.config[cam[name]].username + ':' + + this.config[cam[name]].password + cam[attr].substr(7); + } } cameras[cam.name] = cam;