Try to add u-os-app support (WIP)

This commit is contained in:
Albrecht Lohofener
2024-02-24 09:00:35 +01:00
parent 5942732b95
commit 70280baad8
2 changed files with 23 additions and 19 deletions
+4 -5
View File
@@ -4,15 +4,14 @@
<head>
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="icon" href="/img/favicon.svg" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="icon" href="img/favicon.svg" type="image/x-icon">
</head>
<body>
<div>
<iframe src="/script-server" width="27%"></iframe>
<iframe src="/novnc" width="70%"></iframe>
<iframe src="script-server/" width="27%"></iframe>
<iframe src="novnc/" width="70%"></iframe>
</div>
</body>
</html>
+19 -14
View File
@@ -26,25 +26,17 @@ server {
add_header Cache-Control "no-cache";
location / {
root /run/shm;
if ( -f /run/shm/index.html) {
break;
}
try_files /index.html @vnc;
root /var/www;
}
location @vnc {
root /usr/share/novnc;
location /novnc {
index vnc.html;
alias /usr/share/novnc;
try_files $uri $uri/ /vnc.html;
if ($request_uri = "/") {
return 301 ?resize=scale&autoconnect=true&path=u-os-app-openwrt/websockify;
if ($request_uri = "/novnc/") {
return 301 ?resize=scale&autoconnect=true&reconnect_delay=2000&reconnect=true&path=u-os-app-openwrt/websockify;
}
}
location /websockify {
@@ -61,4 +53,17 @@ server {
proxy_pass http://127.0.0.1:5700/;
}
location /script-server/ {
proxy_pass_header Server;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:5000/;
# needed for websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin http://$proxy_host;
}
}