Set secrete_key to fix cookie persistence

rust
Elnu 1 year ago
parent 53de257960
commit 1f33a60f7a

@ -1,3 +1,5 @@
CLIENT_ID= CLIENT_ID=
CLIENT_SECRET= CLIENT_SECRET=
DOMAIN=https://tegakituesday.com/ DOMAIN=https://tegakituesday.com/
# head -c64 /dev/urandom | base64
SECRET=

@ -309,8 +309,10 @@ impl User {
#[launch] #[launch]
fn rocket() -> _ { fn rocket() -> _ {
let config = rocket::Config::figment().merge(("port", 1313));
dotenv::dotenv().expect("Failed to load .env file"); dotenv::dotenv().expect("Failed to load .env file");
let config = rocket::Config::figment()
.merge(("port", 1313))
.merge(("secret_key", env::var("SECRET").expect("Must have SECRET defined in .env for private cookie persistence")));
rocket::custom(config) rocket::custom(config)
.mount( .mount(
"/", "/",

Loading…
Cancel
Save