pub struct HeadersCfg {
pub hsts: bool,
pub csp: String,
pub csp_report_only: bool,
pub csp_report_uri: String,
pub referrer_policy: String,
pub permissions_policy: String,
pub frame_options: String,
pub force_secure_cookies: bool,
pub httponly_cookies: bool,
pub httponly_cookie_exempt: Vec<String>,
pub strip: Vec<String>,
}Fields§
§hsts: bool§csp: String§csp_report_only: boolSend the CSP as Content-Security-Policy-Report-Only instead of enforcing it. Lets
you roll out / tighten a policy by collecting violations first without breaking the
page.
csp_report_uri: StringIf set, a report-uri <value> directive is appended to the CSP so browsers POST
violation reports there. Point it at EdgeGuard’s own sink (“/__edgeguard/csp-report”)
to have them logged, or at any external collector.
referrer_policy: String§permissions_policy: String§frame_options: StringAdd HttpOnly to Set-Cookie responses that lack it. On by default. Turn off (or use
httponly_cookie_exempt) for apps that intentionally expose a cookie to JavaScript —
e.g. a double-submit CSRF token the frontend must read from document.cookie.
Cookie NAMES that must never get HttpOnly, even when httponly_cookies is on. The
surgical exemption for a readable double-submit CSRF cookie, e.g. ["doneyet_csrf"].
Names match exactly (cookies are case-sensitive).
strip: Vec<String>Response headers to strip (case-insensitive), e.g. [“Server”, “X-Powered-By”].
Trait Implementations§
Source§impl Clone for HeadersCfg
impl Clone for HeadersCfg
Source§fn clone(&self) -> HeadersCfg
fn clone(&self) -> HeadersCfg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more