Skip to main content

Module web_ui

Module web_ui 

Source
Expand description

Embedded single-binary SSR Forge Web UI for arks serve (E8 — GitHub/GitLab common interface).

Compile-time embedded assets (include_str!), strict HTML entity escaping on every dynamic value, and Content-Security-Policy: default-src 'self'; script-src 'self'. 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/POST requests to the embedded SSR Web UI (local Actions disabled).
handle_web_ui_with_actions
Route browser GET/POST 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.
init_bare_repo
Initialize a standards-compliant bare Git repository purely in Rust (zero git spawn).
multi_repo_page_handler
Build a PageHandler serving multiple Git repositories under root_dir.
web_ui_page_handler
Build a PageHandler serving the embedded SSR Web UI for git_dir (local Actions runner disabled unless ARKS_SERVE_ALLOW_LOCAL_ACTIONS=1).
web_ui_page_handler_with_actions
Build a PageHandler serving the embedded SSR Web UI with explicit opt-in control over local Actions workflow execution.