Repository navigation
v2.2.0
Every instance now has a landing page at /, the API reference at /api, and
its own copy of the documentation at /docs in three languages, with
robots.txt and a sitemap. Requests to t.me present a current Chrome 156 and
keep t.me's cookie like a browser. The /v1 and GraphQL contracts are
unchanged.
Added
- A public face for the instance.
/is a landing page now: what the service is, a Try it box for
GET /v1/body/{channel}with the response, the instance's health, version
and features, and links to the docs, the API reference, GraphQL and GitHub.
Static HTML, CSS and a little JS from the package, light and dark,
without a framework or anything loaded from elsewhere (CSP'self').- The documentation is served at
/docs/(/docs/es/,/docs/ru/). The
image ships it, built for that prefix byscripts/build_docs.py
(DOCS_SITE_DIR=/app/docs, about 8 MB more image), so it needs no proxy and
always matches the running version. Without a build/docs/…redirects to
GitHub Pages. /robots.txtand/sitemap.xml: every docs page in all three languages
withhreflangalternates, generated from the zensical navs at build
time, on the newPUBLIC_URLsetting (the deploy sets it from
PUBLIC_URLorPUBLIC_HOST).- With
ENABLE_POWthe browser solves the proof of work, for the landing
page and for Swagger's Try it out, on Web Workers with a synchronous
SHA-256 (difficulty 16 in about half a second).
Changed
- Swagger UI moved from
/to/api;/openapi.jsonstays. Old deep
links (/#/Channel/...) are forwarded to/apiby the landing page.
DISABLE_DOCShides the new pages as well, and/robots.txtthen disallows
everything. The smoke matrix checks the new pages. - Responses that set their own
Cache-Control(docs, static files,
rejections) keep it behind Cloudflare; theCACHE_MODEedge default only
fills in the others.
Fixed
- The landing page's proof-of-work worker checks its task: a difficulty above
32 used to search forever, and malformed input now fails at once. It also
ignores messages from another origin (CodeQL: missing origin verification). - The docs' own sitemaps (
/docs/sitemap.xml,/docs/es/…,/docs/ru/…)
carried root-relative locations, which Google Search Console rejects (33
errors). The instance now serves them with absolute URLs for its public
address; the docs theme navigates with them as before.