switch to private cookies + make them last 1 month

This commit is contained in:
2025-08-13 14:56:47 +02:00
parent e120d19dc8
commit 161f4f4073
7 changed files with 254 additions and 23 deletions

View File

@@ -1,9 +1,9 @@
use crate::{language::language, page::Page};
use axum::http::HeaderMap;
use axum_extra::extract::CookieJar;
use axum_extra::extract::PrivateCookieJar;
use maud::{html, Markup, PreEscaped};
pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
pub(super) async fn index(cookies: PrivateCookieJar, headers: HeaderMap) -> Markup {
let lang = language(&cookies, &headers);
rust_i18n::set_locale(lang.to_locale());