Add embedded favicon and suppress noVNC secure-context warning

- serve /favicon.ico outside session middleware so it loads on the login
  page too (was 404 via the catch-all -> requireSession redirect)
- add embedded internal/server/static/favicon.ico (monitor icon) and
  <link rel=icon> on the login page and vnc.html
- in vnc.html wrap console.error before importing core/rfb.js to drop only
  the harmless 'noVNC requires a secure context (TLS). Expect crashes!' line
  (plain VNC-password auth uses pure-JS DES, not crypto.subtle); reword the
  now-redundant disconnect hint
- update AGENTS.md with the favicon route and the secure-context note
This commit is contained in:
Codex
2026-07-31 10:51:39 +03:00
parent 71e2fef4d9
commit 120d4e9498
5 changed files with 51 additions and 3 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ func (s *Server) renderLogin(w http.ResponseWriter, errMsg string) {
const loginPageHTML = `<!doctype html>
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Web VNC</title><style>
<title>Web VNC</title><link rel="icon" href="/favicon.ico" type="image/x-icon"><style>
*{box-sizing:border-box}
body{font-family:system-ui,Segoe UI,sans-serif;background:#0f1720;color:#e2e8f0;display:flex;align-items:center;justify-content:center;height:100vh;margin:0}
.card{background:#111827;padding:2rem 2.25rem;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.5);width:320px}