From 7b5ad47ee250b6461534057ac71bf551d3cac6ed Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Sun, 21 Nov 2021 18:08:56 +0100 Subject: [PATCH] server: Make the JWT cookies valid for / This will be used to secure the password change API. --- server/src/infra/auth_service.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/infra/auth_service.rs b/server/src/infra/auth_service.rs index 98311d9..6843c20 100644 --- a/server/src/infra/auth_service.rs +++ b/server/src/infra/auth_service.rs @@ -101,7 +101,7 @@ where .cookie( Cookie::build("token", token.as_str()) .max_age(1.days()) - .path("/api") + .path("/") .http_only(true) .same_site(SameSite::Strict) .finish(), @@ -148,7 +148,7 @@ where .cookie( Cookie::build("token", "") .max_age(0.days()) - .path("/api") + .path("/") .http_only(true) .same_site(SameSite::Strict) .finish(), @@ -203,7 +203,7 @@ where .cookie( Cookie::build("token", token.as_str()) .max_age(1.days()) - .path("/api") + .path("/") .http_only(true) .same_site(SameSite::Strict) .finish(),