You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b5dad3d
Browse filesBrowse the repository at this point in the historyBrowse files
xinyu-daily 1.1.0: loopback-only routes, JSON-only writes, recover from a corrupt state file
Addresses the review on #27:
- Every route checks that Host is loopback and that a browser Origin, when sent, is this listener
(same check as cq-viewer); anything else gets 403. Writes require application/json (415).
- A truncated, null, or non-object xinyu-state.json is renamed to xinyu-state.broken-<time>.json
and the app starts empty with a warn log; top-level fields of the wrong type fall back to defaults.
- mutate() edits a copy and swaps it in only after the write succeeds, so a failed write leaves
memory and disk in step.
- The page sends the JSON content type on every write, including bodyless ones.
0 commit comments