sx-http: static file serving + inline CSS + cache-bust hashes
OCaml HTTP server now serves /static/* files with MIME types, immutable cache headers, and in-memory caching. Computes MD5 hashes for JS/WASM files and injects them as ?v= cache-busting query params. Inline CSS: reads tw.css + basics.css at startup, injects into <style id="sx-css"> tag. Pages now render with full Tailwind styling. Shell statics now include real file hashes: sx-js-hash, body-js-hash, wasm-hash — 12-char MD5 hex Docker compose: mounts shared/static as /app/static for the container. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,3 +12,6 @@ services:
|
||||
SX_SPEC_DIR: /app/spec
|
||||
SX_LIB_DIR: /app/lib
|
||||
SX_WEB_DIR: /app/web
|
||||
volumes:
|
||||
# Static files (CSS, JS, WASM) — served by Caddy on externalnet
|
||||
- ./shared/static:/app/static:ro
|
||||
|
||||
Reference in New Issue
Block a user