# The site block for one slug under /srv/www. Caddy issues and renews the # certificate itself, so this is the whole configuration for the host. # # /srv/www/pplus is a symlink to the current release (scripts/deploy.sh); # Caddy follows symlinks by default. Routing lives in the URL hash, so the one # page is /, and a path that is not a file is sent there (see handle_errors). # `pixi run caddy-check` serves site/ with a real Caddy under this file and # holds what it answers. # Add both blocks: the snippet first, then the site. # The security headers, for every answer: the files, and index.html served for a 404. (pplus_headers) { # What the page may load and where it may send. Everything is this site's own, # except Compile & run, which posts the Mojo pane and its input to godbolt.org. # script-src the modules, plus the two inline scripts of index.html by # hash: the theme set before paint, and the import map (which # cannot be a file). tests/csp.test.mjs fails when index.html # and these hashes disagree. # style-src 'unsafe-inline' because the views and CodeMirror set style # attributes and