feat(console): embed the management UI in release binaries

- build locked Web dependencies automatically for release profiles
- keep debug Cargo builds independent from the Vite development server
- embed generated Host, Page, manifest, and service worker assets
- serve exact control-plane assets with MIME and cache headers
- reject non-canonical and unknown paths without an SPA fallback
- cover embedded document boundaries and path validation
This commit is contained in:
Maofeng
2026-07-30 09:22:04 +08:00
parent 70ee5e33da
commit f6ad94e948
7 changed files with 239 additions and 0 deletions
Generated
+21
View File
@@ -1844,6 +1844,25 @@ dependencies = [
"icu_properties",
]
[[package]]
name = "include_dir"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd"
dependencies = [
"include_dir_macros",
]
[[package]]
name = "include_dir_macros"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75"
dependencies = [
"proc-macro2",
"quote",
]
[[package]]
name = "index_vec"
version = "0.1.4"
@@ -4709,6 +4728,8 @@ version = "0.1.0"
dependencies = [
"axum",
"base64 0.23.0",
"include_dir",
"mime_guess",
"semver",
"serde",
"serde_json",