Skip to main content

Module web_ui

Module web_ui 

Source
Expand description

Embedded single-binary SSR Web UI for arks serve (E8).

Compile-time embedded stylesheet (include_str!), strict HTML entity escaping on every dynamic value, and Content-Security-Policy: default-src 'self'; script-src 'none'. Never interferes with Git smart/dumb HTTP (info/refs, git-upload-pack, git-receive-pack, objects/, HEAD) or Git LFS (info/lfs/).

Spec: sot:root/v0-2-0-scope-expansion §2.8 (E8).

Constants§

WEB_UI_CSP

Functions§

handle_web_ui
Route browser GET requests to the embedded SSR Web UI; returns None for Git smart/dumb HTTP and LFS paths so protocol traffic passes through untouched.
html_escape
Strictly escape HTML special characters to prevent XSS.
web_ui_page_handler
Build a PageHandler serving the embedded SSR Web UI for git_dir.