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
@@ -52,7 +52,6 @@ export default function ReplyList({ postId, onRefresh }) {
try {
// 答案由服务端 HMAC 校验
await API.createReply(postId, content.trim(), { id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig }, replyTo);
API.logEvent('create_reply').catch(() => {});
setContent('');
setCaptchaInput('');
setReplyTo(null);