This commit is contained in:
Mateusz Gruszczyński committed 2026-11-08 08:43:14 +01:00
1 parent 19dfc51360
commit b6e8ddb9c7
31 files changed
+1080 -32

No files matched your search

+11
View File
@@ -2,10 +2,12 @@
pub mod admin;
pub mod app;
pub mod autodiag;
pub mod autodiscover;
pub mod backend;
pub mod config;
pub mod db;
pub mod dnscheck;
pub mod eas;
pub mod logging;
pub mod metrics;
@@ -33,9 +35,18 @@ pub fn public_router(app: Arc<app::App>) -> Router {
.route("/healthz", axum::routing::get(healthz))
.route("/", axum::routing::get(index))
.fallback(not_found)
.layer(axum::middleware::map_response(mark))
.with_state(app)
}
/// Marker used by the panel diagnostics to tell ActivePush from another application behind the proxy.
async fn mark(mut r: axum::response::Response) -> axum::response::Response {
r.headers_mut()
.entry("X-ActivePush")
.or_insert(axum::http::HeaderValue::from_static("1"));
r
}
async fn index() -> impl axum::response::IntoResponse {
(
[("Content-Type", "text/plain; charset=utf-8")],