Explorar o código

Update cookie

Lee Morgan hai 1 mes
pai
achega
72f97851ae
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/logic/create_cookie.rs

+ 3 - 2
src/logic/create_cookie.rs

@@ -3,10 +3,11 @@ use actix_web::cookie::{Cookie, SameSite, time::Duration};
 pub fn create_cookie(name: String, value: String) -> Cookie<'static> {
     if cfg!(debug_assertions){
         Cookie::build(name, value)
+            .domain("leemorgan.dev")
             .path("/")
             .http_only(true)
-            .same_site(SameSite::Lax)
-            .secure(false)
+            .same_site(SameSite::None)
+            .secure(true)
             .max_age(Duration::days(90))
             .finish()
     } else {