security: server-owned audit logs + fullscreen custom pages

Port upstream PR #22 + Lite style updates:
- lib/audit.js: server-side logAudit(req, action, userId), records
  IP from x-forwarded-for / cf-connecting-ip
- login/register/create_post/create_reply record server-side
- Remove client logEvent calls (AppProvider/NewPost/ReplyList)
- Remove forgeable POST /api/event-logs endpoint
- CustomPage: fullscreen immersive (fixed, 100vh-nav, mobile 56px
  nav offset) matching upstream Lite
This commit is contained in:
lezi-fun committed 2026-08-12 09:06:50 +08:00
1 parent 45ace3ba75
commit b9d6ca5da8
11 files changed
+73 -24

No files matched your search

-1
View File
@@ -71,7 +71,6 @@ export default function NewPost() {
try {
// 答案由服务端 HMAC 校验
await API.createPost(title.trim() || '无标题', content.trim(), images, { id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig });
API.logEvent('create_post').catch(() => {});
toast('发布成功', 'success');
navigate('feed');
refresh();