kerberos-io / web

(DEPRECATED) An open source GUI to configure the machinery and to view events that were detected by the machinery.
https://www.kerberos.io
225 stars 69 forks source link

MJPEG steam is not displayed on dashboard with https #149

Open divis1969 opened 5 years ago

divis1969 commented 5 years ago

HI, I've tried to set up kerberos-io web on the Apache. This setup does not use docker. Apache config is attached (stripped sensitive info, this file is a modified original Apache default-ssl.conf). default-ssl.conf.txt Kerberos-io is accessible via https:///kerberos url.

Most of web works good but an "Activity" (stream) and "Overview" on Dashboard. (note: this configuration could be improved maybe, I'm not a guru in Apache config, just did not find Apache config for kerberos-io, any comments are welcome).

I've found that issue with "Activity" is caused by https url to a stream (https://:8889). I've fixed this with reverting to http protocol in SettingsController.php:

diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php
index 4495a33..3a5ce1a 100755
--- a/app/Http/Controllers/SettingsController.php
+++ b/app/Http/Controllers/SettingsController.php
@@ -295,6 +295,7 @@ class SettingsController extends BaseController
         }
         else
         {
+            $protocol = 'http://';
             $instance = explode(',', $this->getPiece("stream.xml", ["Mjpg","streamPort"])->__toString());
             $url = parse_url(URL::to('/'), PHP_URL_HOST);
             $port = $instance[0];

Perhaps this issue can be fixed in a different way?

P.S. The issue with "Overview" is not yet fixed...