3x-ui/web
MHSanaei 4e7687e2fe
fix(auth): make logout POST+CSRF and propagate session loss to other tabs
- Switch /logout from GET to POST with CSRFMiddleware so it matches the
  SPA's existing HttpUtil.post('/logout') call (previously 404'd silently)
  and blocks GET-based logout via image tags or link prefetchers. Handler
  now returns JSON; the SPA already navigates client-side.
- Return 401 (instead of 404) from /panel/api/* when the caller is a
  browser XHR (X-Requested-With: XMLHttpRequest) so the axios interceptor
  redirects to the login page on logout-in-another-tab, cookie expiry,
  and server restart. Anonymous callers still get 404 to keep endpoints
  hidden from casual scanners.
- One-shot the 401 redirect in axios-init.js and hang the rejected
  promise so queued polls don't stack reloads or surface error toasts
  while the browser is navigating away.
- Add the CSP nonce to the runtime-injected <script> in dist.go so the
  panel loads under the existing script-src 'nonce-...' policy.
- Update api-docs endpoints.js: GET /logout doc entry was missing.
2026-05-13 12:24:05 +02:00
..
controller fix(auth): make logout POST+CSRF and propagate session loss to other tabs 2026-05-13 12:24:05 +02:00
entity feat(settings): redact secrets in AllSettingView and add TrustedProxyCIDRs 2026-05-11 21:16:22 +02:00
global Refactor code and fix linter warnings (#3627) 2026-01-05 05:54:56 +01:00
job fix(security): SSRF prevention, trusted-proxy header gating, CSP nonce, HTTP timeouts 2026-05-11 21:16:23 +02:00
locale v3 2026-05-10 02:13:42 +02:00
middleware fix(security): SSRF prevention, trusted-proxy header gating, CSP nonce, HTTP timeouts 2026-05-11 21:16:23 +02:00
network docs: add comments for all functions 2025-09-20 09:35:50 +02:00
runtime feat(nodes): traffic-writer queue, full-mirror sync, WS event fixes 2026-05-10 16:25:23 +02:00
service Merge branch 'main' into fix/farhadh/security-hardening-2 2026-05-13 11:32:16 +02:00
session refactor(session): store user ID in session instead of full struct 2026-05-11 21:16:22 +02:00
translation feat(panel): xray metrics dashboard with observatory probe history 2026-05-12 02:17:45 +02:00
websocket feat(nodes): traffic-writer queue, full-mirror sync, WS event fixes 2026-05-10 16:25:23 +02:00
web.go Merge branch 'main' into fix/farhadh/security-hardening-2 2026-05-12 11:51:54 +02:00