pub enum PartialHsts {
Disable,
Enable,
IncludeSubDomains,
Preload,
}Expand description
HSTS enabling options as seen from the user’s perspective.
§Caution:
The IncludeSubDomains and Preload settings may have lasting unintended
effects on unrelated HTTP servers (current and future) running on subdomains
of the links host, and may even render those websites unusable for months or
years by requiring browsers to use HTTPS (with TLS) exclusively when doing
HTTP requests to those domains. The Enable setting, however, only impacts
the exact domain it is used from, so should only impact the links redirector
server itself. It is recommended to start testing HSTS (especially
IncludeSubDomains and Preload) with a short max-age initially, and to
test any possible impact on other websites hosted on the same domain and on
its subdomains.
See also:
Variants§
Disable
Don’t send the HTTP Strict Transport Security header
Enable
Send the HSTS header without the preload or includeSubDomains
attributes.
IncludeSubDomains
Send the HSTS header with the includeSubDomains attribute, but without
preload
§Caution:
This may have temporary unintended effects on unrelated HTTP servers running on subdomains of the links host. Make sure that this won’t cause any problems before enabling it and try a short max-age first. More info on https://hstspreload.org/, https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security, and https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security.
Preload
Send the HSTS header with the preload and includeSubDomains
attributes
§Caution:
This may have lasting unintended effects on unrelated HTTP servers (current and future) running on subdomains of the links host, and may even render those websites unusable for months or years.
Read https://hstspreload.org/, https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security, and https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security first, and make sure that this won’t cause any problems before enabling it.
Trait Implementations§
Source§impl Clone for PartialHsts
impl Clone for PartialHsts
Source§fn clone(&self) -> PartialHsts
fn clone(&self) -> PartialHsts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialHsts
impl Debug for PartialHsts
Source§impl Default for PartialHsts
impl Default for PartialHsts
Source§fn default() -> PartialHsts
fn default() -> PartialHsts
Source§impl<'de> Deserialize<'de> for PartialHsts
impl<'de> Deserialize<'de> for PartialHsts
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>,
Source§impl Display for PartialHsts
impl Display for PartialHsts
Source§impl FromStr for PartialHsts
impl FromStr for PartialHsts
Source§impl PartialEq for PartialHsts
impl PartialEq for PartialHsts
Source§impl Serialize for PartialHsts
impl Serialize for PartialHsts
Source§impl TryFrom<&str> for PartialHsts
impl TryFrom<&str> for PartialHsts
impl Copy for PartialHsts
impl Eq for PartialHsts
impl StructuralPartialEq for PartialHsts
Auto Trait Implementations§
impl Freeze for PartialHsts
impl RefUnwindSafe for PartialHsts
impl Send for PartialHsts
impl Sync for PartialHsts
impl Unpin for PartialHsts
impl UnwindSafe for PartialHsts
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request