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