Remove secure cookie for easier local testing
Still rely on samesite and httponly
This commit is contained in:
parent
3c61d2308f
commit
5ae46af107
@ -1,6 +1,6 @@
|
|||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use chrono::{Duration, Utc};
|
use chrono::{Duration, Utc};
|
||||||
use cookie::Cookie;
|
use cookie::{Cookie, SameSite};
|
||||||
use ethers_core::{types::H160, utils::to_checksum};
|
use ethers_core::{types::H160, utils::to_checksum};
|
||||||
use headers::{self, authorization::Bearer};
|
use headers::{self, authorization::Bearer};
|
||||||
use hex::FromHex;
|
use hex::FromHex;
|
||||||
@ -440,9 +440,7 @@ pub async fn authorize(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let session_cookie = Cookie::build(SESSION_COOKIE_NAME, session_id.to_string())
|
let session_cookie = Cookie::build(SESSION_COOKIE_NAME, session_id.to_string())
|
||||||
// .domain(base)
|
.same_site(SameSite::Strict)
|
||||||
// .path("/")
|
|
||||||
.secure(true)
|
|
||||||
.http_only(true)
|
.http_only(true)
|
||||||
.max_age(cookie::time::Duration::seconds(
|
.max_age(cookie::time::Duration::seconds(
|
||||||
SESSION_LIFETIME.try_into().unwrap(),
|
SESSION_LIFETIME.try_into().unwrap(),
|
||||||
|
Loading…
Reference in New Issue
Block a user