nginx: declare every file type the page serves #55

Merged
kathleen merged 1 commits from deploy/explicit-types into main 2026-11-22 01:57:44 +00:00
Owner

Follow-up to #54. The site's nginx sends X-Content-Type-Options: nosniff, so a browser refuses any script that isn't served with a JavaScript type. The config relied on the base image's mime.types for that. This change declares the types of every file the site build writes, so the page loads whatever that list contains:

  • html, js, json, csv, css, svg;
  • yaml, py, md and txt as plain text.

Anything else still falls back to the image's list. The image build's nginx -t step checks the config on merge.

🤖 Generated with Claude Code

Follow-up to #54. The site's nginx sends `X-Content-Type-Options: nosniff`, so a browser refuses any script that isn't served with a JavaScript type. The config relied on the base image's `mime.types` for that. This change declares the types of every file the site build writes, so the page loads whatever that list contains: - `html`, `js`, `json`, `csv`, `css`, `svg`; - `yaml`, `py`, `md` and `txt` as plain text. Anything else still falls back to the image's list. The image build's `nginx -t` step checks the config on merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kathleen added 1 commit 2026-11-22 01:56:48 +00:00
nginx: declare every file type the page serves
CI / test (pull_request) Successful in 41s
b61546a53a
With X-Content-Type-Options: nosniff a browser refuses a script whose type is not
exactly a JavaScript type. Declare the types of every file the site build writes
(html, js, json, csv, css, svg, plus yaml/py/md as text) instead of relying on the
base image's mime.types, so the page loads whatever that list contains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
kathleen merged commit 778e844752 into main 2026-11-22 01:57:44 +00:00
kathleen deleted branch deploy/explicit-types 2026-11-22 01:57:45 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DragonKind/threshing-atlas#55