I am keeping redirected without a specific reason #2607
-
Summarythis is my whole router , disable any middleware let app = dashboard::router()
//.layer(middleware::from_fn(middlewares::auth_middlware))
.merge(auth::router())
.merge(oauth::router())
.layer(session_layer)
.with_state(state)
.nest_service("/assets", ServeDir::new("assets")); I am kept redirected from without any reason here is my pub fn router() -> Router<AppState> {
Router::new().route("/", get(dashboard)).route("/t", get(t))
}
#[axum::debug_handler]
pub async fn dashboard() -> DashboardTemplate {
println!("dashboard");
DashboardTemplate {
title: "Dashboard",
messages: None,
username: "Hos".to_string(),
}
}
pub async fn t() -> DashboardTemplate {
DashboardTemplate {
title: "Dashboard",
messages: None,
username: "Hos".to_string(),
}
} I have no errors and I have disabled everything for testing .. got crazy !! any idea? axum versionlatest |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
it was a chrome issue |
Beta Was this translation helpful? Give feedback.
-
actually you can avoid this issue. remeber to not send these http code to Chrome: ](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301) instead you should use: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302 https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307 |
Beta Was this translation helpful? Give feedback.
it was a chrome issue