From 80af9cfb858dd18bc1cf26ce213aecd52bd8fc7b Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 27 Sep 2024 15:36:56 -0400 Subject: Browsers default Path= to the directory part of the request URI. This change makes the identity cookie available throughout `/api`. --- src/login/extract.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/login/extract.rs') diff --git a/src/login/extract.rs b/src/login/extract.rs index 542f879..5ef454c 100644 --- a/src/login/extract.rs +++ b/src/login/extract.rs @@ -35,6 +35,7 @@ impl IdentityToken { pub fn set(self, secret: &str) -> Self { let identity_cookie = Cookie::build((IDENTITY_COOKIE, String::from(secret))) .http_only(true) + .path("/api/") .permanent() .build(); -- cgit v1.2.3