diff --git a/.env.example b/.env.example index 842628a..594bf3c 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,5 @@ CLIENT_ID= CLIENT_SECRET= -DOMAIN=https://tegakituesday.com/ \ No newline at end of file +DOMAIN=https://tegakituesday.com/ +# head -c64 /dev/urandom | base64 +SECRET= \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 7476d2b..38915e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -309,8 +309,10 @@ impl User { #[launch] fn rocket() -> _ { - let config = rocket::Config::figment().merge(("port", 1313)); 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) .mount( "/",