Don't check for /favicon.ico path in require_auth_mw
All checks were successful
Push Workflows / rustfmt (push) Successful in 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / clippy (push) Successful in 28s
Push Workflows / test (push) Successful in 40s
Push Workflows / docs (push) Successful in 41s
Push Workflows / build (push) Successful in 1m50s
Push Workflows / nix-build (push) Successful in 5m17s

The server returns the icon before this middleware is reached
This commit is contained in:
2026-06-30 21:17:37 -04:00
parent 3ec07c0469
commit fa9ea95657

View File

@@ -13,13 +13,12 @@ const ALLOWED_PATH_PREFIX: [&str; 1] = ["/assets/"];
#[cfg(debug_assertions)]
const ALLOWED_PATH_PREFIX: [&str; 2] = ["/assets/", "/wasm/"];
const ALLOWED_PATHS: [&str; 6] = [
const ALLOWED_PATHS: [&str; 5] = [
"/login",
"/signup",
"/api/v1/auth/login",
"/api/v1/auth/signup",
"/api/v1/auth/user",
"/favicon.ico",
];
/// Axum middleware to redirect an unauthenticated request to /login unless it matches one of the allowed paths