Versions are 0.MINOR.PATCH while the API settles. A patch fixes a defect and never
changes what a working host sees. A minor adds, and may break: when it does, the entry
opens with Breaking, says what a host must change, and the README says "since" beside
the behaviour. Every release is on Clojars as dev.arkaitz/web-base and tagged vX.Y.Z.
:login-path must be a page of the router — a
route that answers GET there and is not gated itself — or handler refuses to build,
naming [:login-path]. It used to send every refused visitor to a 404, or round a
loop, and say nothing until somebody signed out. A host :login-path that wins over a
plugin's while the plugin's login page stays where it mounted it is the case that
asked for it. A gate on a route or on one of its methods counts; the login path's query
or fragment is ignored for the match, and a login page on another origin — a single
sign-on's — is not checked.:i18n :locales lists the languages the site speaks; without it, the
site speaks its :default-locale alone. It was the dictionary's keys, so a plugin's
English and Spanish dictionary made an English-only site answer a Spanish browser with
a Spanish login and <html lang="es"> over every page. A plugin's dictionary is now
taken only in the listed languages, and a host :dict entry in any other is refused
at construction — a bilingual host adds :locales [:en :es]. A listed language with
no strings still names the request (:wb/locale, <html lang>), its strings falling
back to the default's.:assets, :stylesheets and :plugins are the base's names now. A host
that kept its own values under them is refused at construction; rename them.:plugins [...]: values a library prepares from the keys a host writes — :routes,
:sessionless, :i18n {:dict …}, one asset root, :stylesheets, and at most one
:subject-fn, :login-path, :session — merged by wb/expand into the plain config,
every collision refused by name, the host's own keys winning. Nothing is discovered: a
plugin is data the host hands over, one line each, and the base calls its functions
only where it already called the host's.:assets [{:path "/name/" :root "classpath/prefix"}]: resource roots served beside
/wb/, before the session; :stylesheets [...]: linked by the shell after wb.css,
plugins' first and the host's last, on every page and error page drawn with the shell. A host links its
own CSS with :stylesheets ["/app.css"] instead of through :head.:security :proxy? is refused, naming its replacement. It took the first
X-Forwarded-For entry, which the client writes: behind nginx, AWS, Heroku or Fly,
which append, anyone chose their own rate-limit bucket (measured: 12 sign-ins, no 429).
:proxy-hops n takes the entry n from the right; brackets and a port are removed.:max-body-bytes (200 000 by default) is a
413, whether it declares its length or not. Jetty's form limit never applied, since
Ring reads the body; four 1 GB POSTs filled a 4 GB heap.login-path?next=<page>;
testing/gate-refusal? accepts it.Cache-Control: no-store unless the
handler said how it may be cached.:sessionless path ending in / is a prefix answering its whole
subtree, where it was one exact path; / itself, and a prefix covering one of the
routes, are refused at construction.:hsts :max-age past a billion is refused as milliseconds: it is seconds.:wb/multipart {:max-file-size n …} parses a file upload for that route
alone, before CSRF, into temporary files deleted when the request ends;
testing/visit takes {:files …} on a POST, PUT or PATCH.wb/redirect-for, the gate's redirect for a host's own detour; response/health, a
probe that answers ok or 503 and nothing else.:virtual-threads? false restores the platform pool; a
host :thread-pool is used as given. Needs JDK 21 or later. Measured after the
release in GraalVM native images, macOS and static musl, through this default path.testing/visit takes {:headers {…}}, sent on every request of the visit, redirects
included; a header visit writes itself is refused by name.:wb/log-path :template logs a route by its template
(/login/redeem/:token) instead of its path — in the access line and in every error
line of the base, even when the session store throws before the router runs. Any other
value, or the key under one method, is refused at construction.:subject-fn, a page and its fragment on one route, and why an error layout draws no
form.:session, :security and its :hsts,
:i18n, :static — an unknown key is refused at construction, naming its path. A
misspelt key used to be ignored in silence.refuse-form and form-done, for a form that works with and without JavaScript.testing/visit sends PUT, PATCH and DELETE with the POST's CSRF rules, puts params
where htmx does, and refuses what no browser form can send.wbi/init's failure names the Integrant key that threw and its :config-key.Locale/ROOT: under a Turkish default locale Allow said
OPTİONS.web-base:.stop drains in-flight requests for up to :stop-timeout-ms (10 s by default).wbi/init is public; a halt that fails on shutdown is logged.testing/visit with {:follow? false}, and testing/gate-refusal?.wbi/run!, a host's whole -main.:sessionless routes, answered before the session — a health probe that carries a
cookie answers while the session store is down.testing/browser and testing/visit, a browser for a host's suite.rerender and response/unprocessable, a form's round trip.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |