Add open-signup to list of allowed endpoints
This commit is contained in:
@@ -13,12 +13,13 @@ const ALLOWED_PATH_PREFIX: [&str; 1] = ["/assets/"];
|
|||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
const ALLOWED_PATH_PREFIX: [&str; 2] = ["/assets/", "/wasm/"];
|
const ALLOWED_PATH_PREFIX: [&str; 2] = ["/assets/", "/wasm/"];
|
||||||
|
|
||||||
const ALLOWED_PATHS: [&str; 5] = [
|
const ALLOWED_PATHS: [&str; 6] = [
|
||||||
"/login",
|
"/login",
|
||||||
"/signup",
|
"/signup",
|
||||||
"/api/v1/auth/login",
|
"/api/v1/auth/login",
|
||||||
"/api/v1/auth/signup",
|
"/api/v1/auth/signup",
|
||||||
"/api/v1/auth/user",
|
"/api/v1/auth/user",
|
||||||
|
"/api/v1/auth/open-signup",
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Axum middleware to redirect an unauthenticated request to /login unless it matches one of the allowed paths
|
/// Axum middleware to redirect an unauthenticated request to /login unless it matches one of the allowed paths
|
||||||
|
|||||||
Reference in New Issue
Block a user