Configuration
Signed update requests
Section titled “Signed update requests”Every POST /conduit/update must present a valid relative signature
(signed:relative). This is stricter than a client-side snapshot checksum
alone:
@conduitScriptsembeds a short-lived signed endpoint inwindow.__CONDUIT__.endpoint/<meta name="conduit-endpoint">.- The route carries
middleware=["signed:relative"]. - Each successful update rotates
effects.endpointso long-lived tabs stay fresh. - Signatures cover the internal path (
/conduit/update?expires&signature);APP_BASE_PATHis prefixed only for the browser — so subpath mounts keep verifying correctly.
Bare /conduit/update without a signature returns 403. CSRF still applies
(419 when the session token is missing).
Config: conduit.signature_ttl_minutes (default 720).
Subpath hosting (APP_BASE_PATH)
Section titled “Subpath hosting (APP_BASE_PATH)”Serving interactive components under a public prefix (/my-app, /apps/foo)
is a common footgun. Conduit is built on Almasix’s existing subpath story:
- Route URIs stay unprefixed (
POST /conduit/update) inside the app. - The HTTP kernel mounts ASGI at
APP_BASE_PATH(almasix.http.subpath). @conduitScriptsemits prefixed URLs viaurl()and an inlinewindow.__CONDUIT__ = { base, endpoint, asset }plus<meta name="conduit-endpoint">/conduit-base.- The JS client never hardcodes
/conduit/update. It reads that boot config (or derives the prefix from the scriptsrc), andwithBase()guardswire:navigate/ root-absolute paths.
# .envAPP_BASE_PATH=/my-appThen the browser posts to /my-app/conduit/update and loads
/my-app/conduit/conduit.js. Confirm those URLs in DevTools after setting
APP_BASE_PATH.
Configuration
Section titled “Configuration”config = { "endpoint": "/conduit/update", "asset_url": "/conduit/conduit.js", "inject_assets": True, "checksum_key": None, "signature_ttl_minutes": 720, "alpine_cdn": "https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js", "coalesce_ms": 16, "csp_safe": False,}