pub struct AppState {Show 21 fields
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 live_reload: bool,
pub pay_config: PayConfig,
pub data_root: Option<PathBuf>,
pub quota: Option<Arc<dyn QuotaPolicy>>,
pub pod_create_limiter: Arc<PodCreateLimiter>,
pub allowed_origins: Vec<String>,
pub admin_key: Option<String>,
pub mcp_enabled: bool,
pub mempool_url: Option<String>,
pub conneg_enabled: bool,
pub trust_proxy: bool,
pub public_base_url: Option<String>,
pub allowed_hosts: Vec<String>,
pub cross_identity: Option<Arc<dyn CrossIdentityResolver>>,
pub activitypub: Option<Arc<dyn ActorDocument>>,
}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.
live_reload: boolInject a development-only WebSocket reload client into HTML responses.
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).
quota: Option<Arc<dyn QuotaPolicy>>Optional atomic per-pod quota policy applied to every LDP mutation.
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.
mcp_enabled: boolWhen true, the MCP (Model Context Protocol) server is mounted at
POST /mcp, exposing the pod as a tool surface for agents. OFF by
default — keys-on-disk and agent write access are an opt-in
security tradeoff. Configured via --mcp / JSS_MCP (JSS #490).
mempool_url: Option<String>Optional override for the mempool REST base URL used by the MRC20
/pay/.deposit anchor verification (provenance-upgrade Phase 3).
None ⇒ the handler reads JSS_PAY_MEMPOOL_URL (default testnet4).
Tests point this at a local fixture server so they never reach
mempool.space; production leaves it None.
conneg_enabled: boolContent negotiation (JSS --conneg). When on, text/n3 is accepted
and advertised alongside Turtle for request bodies; when off a
text/n3 body is refused with 415 as in JSS canAcceptInput.
trust_proxy: boolHonour X-Forwarded-Proto / cf-visitor for the request scheme and
X-Forwarded-Host / Forwarded for the host.
Off by default: only enable behind a proxy that overwrites them.
public_base_url: Option<String>Public base URL of this server (JSS_PUBLIC_BASE_URL). When set it
is the origin used for NIP-98 URL matching and every generated
absolute URL, whatever Host or forwarding headers say.
allowed_hosts: Vec<String>Hosts this server answers for (JSS_ALLOWED_HOSTS). Empty permits
any Host; otherwise a request for another host gets 421.
cross_identity: Option<Arc<dyn CrossIdentityResolver>>did:nostr to WebID resolver applied to NIP-98 callers. None
disables cross-identity (the caller is the did:nostr agent only).
activitypub: Option<Arc<dyn ActorDocument>>ActivityPub actor provider; Some mounts the actor route (set by the
activitypub feature’s ApConfig; always None otherwise).