mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-25 23:28:37 -06:00
chg: Allow insecure cookies
This commit is contained in:
parent
57d390a129
commit
f6255566b0
1 changed files with 5 additions and 4 deletions
|
@ -127,10 +127,11 @@ async fn main() -> std::io::Result<()> {
|
|||
// Actually start the server
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.wrap(SessionMiddleware::new(
|
||||
CookieSessionStore::default(),
|
||||
secret_key.clone(),
|
||||
))
|
||||
.wrap(
|
||||
SessionMiddleware::builder(CookieSessionStore::default(), secret_key.clone())
|
||||
.cookie_secure(false)
|
||||
.build(),
|
||||
)
|
||||
// Maintain a single instance of database throughout
|
||||
.app_data(web::Data::new(AppState {
|
||||
db: database::open_db(env::var("db_url").unwrap_or(db_location.clone())),
|
||||
|
|
Loading…
Reference in a new issue