A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
feat(app-proxy): add module map support (#3900)
marsh0e0286943782
diff --git a/fluxer_app_proxy/src/routes/mod.rs b/fluxer_app_proxy/src/routes/mod.rsindex c16156bda..19c6b4b03 100644--- a/fluxer_app_proxy/src/routes/mod.rs+++ b/fluxer_app_proxy/src/routes/mod.rs@@ -49,6 +49,7 @@ pub fn build_router(state: AppState) -> Router {get(apple_association::apple_app_site_association),).route("/assets/{*path}", get(assets_proxy::proxy_assets))+ .route("/module-map.json", get(spa_static::module_map)).route("/version.json", get(spa_static::version_json)).route("/manifest.json", get(spa_static::manifest_json)).route("/browserconfig.xml", get(spa_static::browserconfig_xml))diff --git a/fluxer_app_proxy/src/routes/spa_static.rs b/fluxer_app_proxy/src/routes/spa_static.rsindex ef5490b00..ace70423a 100644--- a/fluxer_app_proxy/src/routes/spa_static.rs+++ b/fluxer_app_proxy/src/routes/spa_static.rs@@ -13,6 +13,10 @@ use axum::{const STATIC_TEXT_CACHE_CONTROL: &str = "no-cache";+pub async fn module_map(State(state): State<AppState>, headers: HeaderMap) -> Response {+ serve_static_text_file(&state, &headers, "module-map.json", "application/json").await+}+pub async fn version_json(State(state): State<AppState>, headers: HeaderMap) -> Response {let mut result =serve_static_text_file(&state, &headers, "version.json", "application/json").await;