From e431c4047521084c489167af8e615f84158a07be Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Thu, 13 May 2021 19:32:46 +0200 Subject: [PATCH] Remove user_id cookie We can't read it from JS anyway --- src/infra/tcp_server.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/infra/tcp_server.rs b/src/infra/tcp_server.rs index 0f01155..3f19cd8 100644 --- a/src/infra/tcp_server.rs +++ b/src/infra/tcp_server.rs @@ -99,11 +99,6 @@ where .http_only(true) .finish(), ) - .cookie( - Cookie::build("user_id", &request.name) - .max_age(1.days()) - .finish(), - ) .body(token.as_str().to_owned()), ) }) @@ -172,7 +167,7 @@ where "/{filename:(index\\.html|main\\.js)?}", web::get().to(index), ) - .service(web::resource("/authorize").route(web::post().to(post_authorize::))) + .service(web::resource("/api/authorize").route(web::post().to(post_authorize::))) // API endpoint. .service( web::scope("/api")