static

Every site serves one folder of files as-is: static/ in the site folder — fixed location, created at start; the config sets only the public prefix. The stylesheet you are reading this with comes from there.

keydescription
url_prefixpublic prefix; must not be / and must not overlap /cms, /soe, media or any route
"static": { "url_prefix": "/static" }

Files go out with a five-minute cache header, so an edited file reaches visitors quickly (hot files additionally graduate into the in-memory accelerator — see the cache article). Path traversal is blocked (the canonicalized path must stay inside the folder), and names starting with a dot are never served.

← All articles in this group