pub struct AppState {
pub storage: Arc<dyn Storage>,
pub dotfiles: Arc<DotfileAllowlist>,
pub body_cap: usize,
pub nodeinfo: NodeInfoMeta,
pub mashlib: MashlibConfig,
pub mashlib_cdn: Option<String>,
pub pay_config: PayConfig,
pub data_root: Option<PathBuf>,
pub pod_create_limiter: Arc<PodCreateLimiter>,
pub allowed_origins: Vec<String>,
pub admin_key: Option<String>,
}Expand description
Actix-web shared state.
Fields§
§storage: Arc<dyn Storage>§dotfiles: Arc<DotfileAllowlist>§body_cap: usize§nodeinfo: NodeInfoMeta§mashlib: MashlibConfig§mashlib_cdn: Option<String>Legacy alias — reads from mashlib.mode when Cdn. Deprecated;
use mashlib directly.
pay_config: PayConfigPayment configuration — drives /pay/.info and the X-Balance /
X-Cost / X-Pay-Currency response headers on paid resources.
data_root: Option<PathBuf>Absolute filesystem root of the pod storage tree. Some when the
backend is FsBackend; None for in-memory or cloud-backed
storage. Required by the git feature to locate pod directories
for GitAutoInit (provisioning) and GitHttpService (serving).
pod_create_limiter: Arc<PodCreateLimiter>JSS-compatible pod creation limiter: one POST /.pods per IP per day.
allowed_origins: Vec<String>When non-empty, CORS responses are only reflected for origins in this
list. Origins not in the list receive no Access-Control-Allow-Origin
header. When empty (the default), the request Origin is echoed back
(wildcard-equivalent behaviour, suitable for local dev).
Configured via --allowed-origins / SOLID_ALLOWED_ORIGINS (comma-separated).
admin_key: Option<String>Pre-shared key for the POST /_admin/provision/{pubkey} endpoint.
When None, the endpoint returns 403 unconditionally.
Configured via --admin-key / SOLID_ADMIN_KEY.