pub struct AdvancedConfig {
pub trust_forwarded_host: bool,
pub ip_address: IpAddressConfig,
pub disable_csrf_check: Option<bool>,
pub disable_origin_check: bool,
pub disable_origin_check_paths: Vec<String>,
pub skip_trailing_slashes: bool,
pub use_secure_cookies: Option<bool>,
pub cross_sub_domain_cookies: Option<CrossSubDomainConfig>,
pub cookies: HashMap<String, CookieOverride>,
pub default_cookie_attributes: CookieAttributes,
pub cookie_prefix: Option<String>,
pub database: AdvancedDatabaseConfig,
}Expand description
Advanced configuration options (mirrors TS advanced block).
Fields§
§trust_forwarded_host: boolTrust forwarded host/protocol for URL resolution. Enable only behind a proxy that replaces client-supplied forwarding headers. Defaults to false.
ip_address: IpAddressConfigIP address extraction configuration.
disable_csrf_check: Option<bool>Explicit CSRF override. None preserves the pinned compatibility behavior
where disabling all origin checks also disables first-login CSRF checks.
disable_origin_check: boolIf true, callback / redirect target origin validation is skipped.
This mirrors Better Auth TS advanced.disableOriginCheck.
Request-origin validation is also skipped. First-login Fetch Metadata
checks remain enabled when disable_csrf_check is explicitly Some(false).
disable_origin_check_paths: Vec<String>Skip origin validation for a literal path and its descendants. This does not disable first-login cross-site navigation protection.
skip_trailing_slashes: boolAdmit trailing slashes while resolving the original registered endpoint.
Select the secure cookie name prefix and initial Secure attribute. None uses the configured base URL protocol. Attribute overrides do not change this choice; the serializer enforces Secure for reserved prefixes.
Cross-subdomain cookie sharing configuration.
Per-cookie-name overrides (name, attributes, prefix).
Keys are the logical cookie names (e.g. "session_token",
"csrf_token"). Values specify the attributes to override.
Default cookie attributes applied to every cookie the library sets
(individual overrides in cookies take precedence).
Optional prefix prepended to every cookie name (e.g. "myapp" →
"myapp.session_token").
database: AdvancedDatabaseConfigDatabase-related advanced options.