UiStaticFiles
Static files with cache headers suited to content-hashed builds.
HTML entry points, JSON manifests, and the service worker are served with
no-cache so a new build is picked up immediately; every other asset
carries a content hash in its name and is cached for a year. A page is
read and served wearing the brand (branding.brand_page). The web app's
page holds the unlocked private key, so it runs only its own scripts, is
never framed, and gives a page that opens it, such as a session's, no
handle on it.
Functions
funcfile_response(full_path, stat_result, scope, status_code=200) -> ResponseAdd Cache-Control, the brand, and the web app's isolation to the response Starlette builds.
paramfull_pathAnyparamstat_resultos.stat_resultparamscopeAnyparamstatus_codeint= 200Returns
fastapi.responses.Response