fix: Remove redirect on index

This commit is contained in:
Ginger
2026-03-18 12:31:27 -04:00
parent 6451671f66
commit 0cc188f62c
3 changed files with 14 additions and 12 deletions
+6 -3
View File
@@ -76,11 +76,14 @@ pub fn build() -> Router<state::State> {
#[allow(clippy::wildcard_imports)]
use pages::*;
Router::new()
.merge(index::build())
let sub_router = Router::new()
.merge(resources::build())
.merge(password_reset::build())
.fallback(async || WebError::NotFound)
.fallback(async || WebError::NotFound);
Router::new()
.merge(index::build())
.nest("/_continuwuity/", sub_router)
.layer(SetResponseHeaderLayer::if_not_present(
header::CONTENT_SECURITY_POLICY,
HeaderValue::from_static("default-src 'self'; img-src 'self' data:;"),
+5 -1
View File
@@ -3,7 +3,11 @@ use axum::{Router, extract::State, response::IntoResponse, routing::get};
use crate::{WebError, template};
pub(crate) fn build() -> Router<crate::State> { Router::new().route("/", get(index_handler)) }
pub(crate) fn build() -> Router<crate::State> {
Router::new()
.route("/", get(index_handler))
.route("/_continuwuity/", get(index_handler))
}
async fn index_handler(
State(services): State<crate::State>,