Skip to content

mikanBox Cloud v0.8.1

Choose a tag to compare

@yoshihik0 yoshihik0 released this 09 Nov 04:16
· 48 commits to main since this release

mikanBox Cloud 0.8.1 remains a development edition.

Fixes found on a real Cloudflare deployment of 0.8.0:

  • Garbled text on the public site. Cloudflare's delivery typed .md, .txt, .csv, .js and .css by extension without a charset, so Japanese text opened from the globe icon in the page list was garbled. _headers now sets charset=utf-8 with one wildcard rule per text extension (/*.md and so on), plus exact rules for the /id and /id/ aliases of Markdown-only pages and /api/ID of mikanBox DB, because Cloudflare matches the requested path, not the rewrite target. XML files keep exact rules so the sitemap and feeds keep their own types.
  • CORS for Markdown and data outputs. Markdown versions, data formats (.json, .xml, .csv, .txt, .js, .css) and mikanBox DB are served with Access-Control-Allow-Origin: *, as in the PHP editions, so Markdown viewers and scripts on other sites can read them. HTML, the sitemap and the feeds do not get it.
  • Page list filter. Opening the page editor from a page list filtered by category no longer clears the filter (the search and list page are kept too), and a new page starts with the filtered category, as in the PHP editions.

After updating, publish once more so the new _headers takes effect.

Validation: TypeScript checks and all 262 Cloud tests pass. The generated _headers was served by wrangler's local asset server: every Markdown, text, XML and DB path, aliases included, returned charset=utf-8 and a single Access-Control-Allow-Origin: *, and HTML returned no CORS header. The fix has not yet been checked on the real public site, which needs this update and a re-publish.