diff --git a/site/README.md b/site/README.md index 5ea49a0..deb4832 100644 --- a/site/README.md +++ b/site/README.md @@ -162,9 +162,12 @@ answers rather than files: - **Baseline headers, and one third party by choice.** `nosniff`, a referrer policy, a year of HSTS, `X-Frame-Options`, and a Content-Security-Policy of `default-src 'none'` with `'self'` for - styles, fonts and images. The one origin named besides this one is + styles and fonts. The one origin named besides this one is `cdn.usefathom.com`: Fathom serves the analytics script and receives - its pageviews. It sets no cookie and collects nothing about a person, + its pageviews. It is named under `script-src`, `connect-src` **and + `img-src`** — the beacon is an image request, so an `img-src` that + forgets it loads the script and blocks the pageview, with a clean 200 + on every check. It sets no cookie and collects nothing about a person, which is why the site still needs no consent banner — but it is a third party, and the policy names it rather than opening the door generally. A second one would fail diff --git a/site/build.py b/site/build.py index adbf066..4aa56a4 100644 --- a/site/build.py +++ b/site/build.py @@ -113,7 +113,8 @@ STATIC_SKIP = ("*.md", ".DS_Store") # The assets a template links directly, and the placeholder each one is # offered under. See stamp() for why they carry a query string. -STAMPED = {"stylesheet": "static/site.css", "icon": "static/favicon.svg"} +STAMPED = {"stylesheet": "static/site.css", "icon": "static/favicon.svg", + "board_shot": "static/board.png"} ATX = re.compile(r"^(#{1,6})[ \t]+(.*?)[ \t]*#*[ \t]*$") FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})") @@ -793,6 +794,7 @@ def render_page(page: dict, manifest: dict, *, site: Path, repo: Path, fields = { "stylesheet": stamps["stylesheet"], "icon": stamps["icon"], + "board_shot": stamps["board_shot"], "title": escape(page["title"]), "description": escape(page.get("description") or config.get("description", "")), diff --git a/site/root/_headers b/site/root/_headers index 96d6c36..1337d04 100644 --- a/site/root/_headers +++ b/site/root/_headers @@ -33,7 +33,13 @@ #