5
0
mirror of git://git.proxmox.com/git/novnc-pve.git synced 2025-01-05 13:17:53 +03:00
novnc-pve/debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
Markus Frank f422faaeb1 upgrade novnc and patches to 1.4.0
rebase patches for 1.4.0

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-08 16:57:19 +01:00

39 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:16:09 +0100
Subject: [PATCH] add replaceable snippets in vnc.html
so that we can insert the username/csrftoken via search/replace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
vnc.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/vnc.html b/vnc.html
index 9281009..4ce107a 100644
--- a/vnc.html
+++ b/vnc.html
@@ -13,7 +13,7 @@
or the fragment:
http://example.com/#host=HOST&port=PORT&encrypt=1
-->
- <title>noVNC</title>
+ <title>[% nodename %] - Proxmox Console</title>
<meta charset="utf-8">
@@ -32,6 +32,12 @@
<link rel="preload" as="image" href="/novnc/app/images/warning.svg">
<script type="module" crossorigin="anonymous" src="/novnc/app/error-handler.js"></script>
+ <script type="text/javascript">
+ if (typeof(PVE) === 'undefined') PVE = {};
+ PVE.UserName = '[% username %]';
+ PVE.CSRFPreventionToken = '[% token %]';
+ INCLUDE_URI='/novnc/include';
+ </script>
<script type="module" crossorigin="anonymous" src="/novnc/app/ui.js"></script>
</head>