pub struct CookiesConfig {
pub secure: CookieSecure,
}Expand description
Cookie defaults ([cookies] section).
Fields§
§secure: CookieSecureDefault Secure attribute for cookies Nitr builds — the session
and CSRF cookies, and anything through res.cookies:set /
:set_signed — when the caller’s own options table does not set
secure. An explicit secure from Lua always wins, in both
directions.
This reaches only cookies Nitr builds. A handler that writes the
header itself (headers = { ["Set-Cookie"] = "a=1" }) is converted
straight through and never passes the serializer, so that cookie’s
attributes are the script’s own responsibility.
Deliberately not forced the way HttpOnly is: a Secure cookie
sent over plain http is dropped by the browser without a word, so
forcing it would break local development with a failure mode far
worse than a startup line.
Trait Implementations§
Source§impl Clone for CookiesConfig
impl Clone for CookiesConfig
Source§impl Debug for CookiesConfig
impl Debug for CookiesConfig
Source§impl Default for CookiesConfig
impl Default for CookiesConfig
Source§impl<'de> Deserialize<'de> for CookiesConfigwhere
CookiesConfig: Default,
impl<'de> Deserialize<'de> for CookiesConfigwhere
CookiesConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CookiesConfig
impl RefUnwindSafe for CookiesConfig
impl Send for CookiesConfig
impl Sync for CookiesConfig
impl Unpin for CookiesConfig
impl UnsafeUnpin for CookiesConfig
impl UnwindSafe for CookiesConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more