Serve a content repo's .well-known/ at the site root
Everything a site has to publish for another program to find it lives under /.well-known/, and portal had no way to put a file there: the catch-all answered those paths 200 with the app shell, so a client probing for security.txt or matrix/server got HTML where it expected a document, and could not tell a missing file from a present one. The prefix is the one place this is safe to overlay. RFC 8615 reserves it, and a question's id comes from a file name under questions/, which cannot begin with a dot - so no file a repo ships can shadow a page. The path still goes through is_safe_site_path, so it cannot climb out of the repo either, and a miss is a real 404. Types: an extensionless file under the prefix is JSON, which is what matrix/server and nodeinfo are; .mobileconfig is the Apple profile type, without which iOS downloads a profile instead of offering to install it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GeH3y8fwTaTudaD88P57o
This commit is contained in:
co-authored by
Claude Opus 5
parent
1a2c064d3a
commit
c9faaeb4a6
@@ -4,6 +4,10 @@ One line per change, grouped by the release that shipped it. Newest
|
||||
first. A release is a Cargo.toml bump plus a `v<version>` tag; the
|
||||
content repos pin the tag they run (see the end of this file).
|
||||
|
||||
## 0.6.21 (2026-10-07)
|
||||
|
||||
- A content repo's `.well-known/` is served at the site root (`/.well-known/security.txt`, `/.well-known/assetlinks.json`, `/.well-known/matrix/server`), and a miss there is a 404 instead of the app shell answering 200 with an HTML page. RFC 8615 reserves the prefix and a question's id cannot begin with a dot, so nothing a repo ships can shadow a page. An extensionless file under it is typed as JSON, by the convention those files follow; `.txt`, `.xml`, `.webmanifest` and `.mobileconfig` are typed too, the last so an Apple configuration profile offers to install rather than download.
|
||||
|
||||
## 0.6.20 (2026-10-05)
|
||||
|
||||
- A releases card lets a platform's file carry an architecture: a Mac visitor is offered the `macos-arm64` file, not sent to TestFlight past it.
|
||||
|
||||
Reference in New Issue
Block a user