From dc233601a7773c4081b12b2ef1e6f4450ebd1332 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Fri, 27 Sep 2024 11:37:45 +0800 Subject: [PATCH] chore(routes/avatar): allow avatar being accessed by guest users (#3210) --- ee/tabby-webserver/src/routes/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ee/tabby-webserver/src/routes/mod.rs b/ee/tabby-webserver/src/routes/mod.rs index 7adecd888036..c5af006dc581 100644 --- a/ee/tabby-webserver/src/routes/mod.rs +++ b/ee/tabby-webserver/src/routes/mod.rs @@ -66,12 +66,7 @@ pub fn create( "/repositories", repositories::routes(ctx.repository(), ctx.auth()), ) - .route( - "/avatar/:id", - routing::get(avatar) - .with_state(ctx.auth()) - .layer(from_fn_with_state(ctx.auth(), require_login_middleware)), - ) + .route("/avatar/:id", routing::get(avatar).with_state(ctx.auth())) .nest("/oauth", oauth::routes(ctx.auth())); let ui = ui.route("/graphiql", routing::get(graphiql("/graphql", None)));