summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/configs/nginx/nginx.conf4
-rw-r--r--kvmd/web/js/stream.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/configs/nginx/nginx.conf b/kvmd/configs/nginx/nginx.conf
index 05a11bcc..e0744769 100644
--- a/kvmd/configs/nginx/nginx.conf
+++ b/kvmd/configs/nginx/nginx.conf
@@ -112,8 +112,8 @@ http {
include /etc/nginx/proxy-params.conf;
}
- location /streamer {
- rewrite /streamer/?(.*) /$1 break;
+ location ~ ^/streamer/(snapshot|stream)(?:/(.*))?$ {
+ rewrite /streamer/?(.*)(?:/(.*))?$ /?action=$1 break;
proxy_pass http://mjpg_streamer;
include /etc/nginx/proxy-params.conf;
proxy_buffering off;
diff --git a/kvmd/web/js/stream.js b/kvmd/web/js/stream.js
index 51372420..43b720df 100644
--- a/kvmd/web/js/stream.js
+++ b/kvmd/web/js/stream.js
@@ -27,7 +27,7 @@ function Stream() {
// XXX: In current implementation we don't need this event because Stream() has own state poller
var __startPoller = function() {
- var http = tools.makeRequest("GET", "/streamer/?action=snapshot", function() {
+ var http = tools.makeRequest("GET", "/streamer/snapshot", function() {
if (http.readyState === 2 || http.readyState === 4) {
var status = http.status;
http.onreadystatechange = null;
@@ -117,7 +117,7 @@ function Stream() {
__normal_size = result.size;
__applySizeFactor();
- $("stream-image").src = "/streamer/?action=stream&time=" + new Date().getTime();
+ $("stream-image").src = "/streamer/stream/" + new Date().getTime();
}
});
};