pub struct Config {
pub manifest: PathBuf,
pub bind: String,
pub workers: Option<usize>,
pub cdn_base_url: Option<String>,
pub fallback_dir: Option<PathBuf>,
pub worker_entry: PathBuf,
pub sources_config: Option<PathBuf>,
pub session_secret_env: Option<String>,
pub session_cookie: String,
pub login_url: Option<String>,
pub cache_capacity: usize,
pub policy_delegated: Vec<RoutePolicy>,
}Fields§
§manifest: PathBufLocal path to manifest.json (required).
bind: StringBind address for the HTTP listener.
workers: Option<usize>Number of Bun workers to spawn (default = num_cpus / 2, min 1).
cdn_base_url: Option<String>CDN base URL for Mode 1 redirect dispatch (e.g. https://cdn.yah.dev).
When set, Mode 1 routes 302-redirect to {cdn_base_url}{path}.
fallback_dir: Option<PathBuf>Local dist/ directory for Mode 1 fallback (when CDN is not configured).
worker_entry: PathBufPath to the mesofact-worker entry script (bun entrypoint).
sources_config: Option<PathBuf>Path to mesofact.config.toml. Read for source generation tokens
(cache-key input 6). Missing file → generations resolve to a placeholder.
session_secret_env: Option<String>Env var holding the HMAC key for CookieSessionResolver. When set,
Mode 2 sessions resolve from the session cookie; when unset, sessions
are disabled (requires: ["user"] routes always redirect/401).
Session cookie name (default mesofact_session).
login_url: Option<String>Login URL for requires: ["user"] routes with no session. The proxy
302s here with ?next=<original-url>. Unset → 401 instead.
cache_capacity: usizeMode 2 LRU response-cache capacity (entries).
policy_delegated: Vec<RoutePolicy>Assert that something in front of this process enforces a route policy
this tier does not (R749-T1). Comma-separated field names as written in
mesofact.routes.ts.
The proxy tier’s standing case is resilience: W181 puts retry/timeout
at the always-up edge (the CF Worker reads them from SSR_RESILIENCE),
and this process implements none of it. Deployed behind that Worker the
policy really is enforced — by the Worker — so the deployment says so
here. Run without one and the refusal is correct.
Same spelling and semantics as mesofact serve’s flag on purpose: an
operator moving a workload between tiers should not have to learn a
second vocabulary for the same assertion.
Implementations§
Source§impl Config
impl Config
Sourcepub fn policy_support(&self) -> PolicySupport
pub fn policy_support(&self) -> PolicySupport
What mesofact proxy implements, advertised (R749-T1). One place, and
each line has a code site behind it:
requires—proxy::router’sRequires::Usercheck, the only session-aware serving path in the system.cache_policy—proxy::cache::ResponseCache, built incli::proxy::run.concurrency— the worker pool’s per-route semaphore (packages/mesofact-worker/src/pool.ts, configured from the manifest atworker.ts’sbuildRouteHandlers). W225 §2c records this row as unenforced everywhere; that is wrong, and the code above is why.resilience— NOT enforced. Nothing inmesofact-corereads it; W181’s only consumer is the CF Worker (packages/mesofact-edge/src/router.ts, fromSSR_RESILIENCE). Delegate it when that Worker is in front.
pub fn worker_count(&self) -> usize
Trait Implementations§
Source§impl Args for Config
impl Args for Config
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Config
impl CommandFactory for Config
Source§impl FromArgMatches for Config
impl FromArgMatches for Config
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.