- WS handshake: same-origin CheckOrigin instead of allow-all
- route_ws require_auth/需要登录: broadcast/room need a session by default,
explicit opt-out for public feeds; unauthenticated handshakes get 401
- WS limits: 1 MiB per message, 256 replies per connect; transport errors
return {ok:false, error} instead of an empty success; empty rooms GC'd
- net host: enforce the 8 MiB response cap while reading (incl. error and
SSE error paths) so a peer cannot exhaust memory
- url_encode: %20 for space (URL segment semantics, not form +)
- docs: sync 网页 (route_ws 需要登录, connect caps) and CHANGELOG
- tests: gold expectations, live fixture opt-out, hub GC, ws auth gate
Co-authored-by: Cursor <cursoragent@cursor.com>
ext/web
Official dynamic website extension: GFM tables + class methods.
Design: doc/design/ext-web.md.
| Surface | Import | Classes |
|---|---|---|
| English | > ext/web/web.mq.md |
page · db · app · form · style |
| Chinese | > ext/web/网页.mq.md |
页面 · 数据库 · 应用 · 表单 · 样式 |
cargo build -p marqdo_plugin_web
# optional install into ~/.marqdo/ext
marqdo ext add web
Canonical sample (design §4): examples/web-site/.
cargo run -- run examples/web-site/index.mq.md
# http://127.0.0.1:18081/
# /_form/article · /admin · /admin/articles/new
Offline smokes: tests/ext/web-smoke.mq.md, web-form-smoke.mq.md, web-admin-smoke.mq.md.
| Feature | Notes |
|---|---|
| Form §5.5 | field/rules tables · validate · submit · mount_form → GET|POST /_form/{id} |
| Admin CRUD | admin=True · schema → same form path · new/edit/delete under /admin/{table} |
| Route | `app`.route path=/about page=`about` → GET /about |