mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-08-07 01:13:11 +02:00
Add OPTIONS to API proxy, fix admin event listener accumulation, rename admin routes from /a/ to /admin/
- Add OPTIONS to the web API proxy route methods for CORS preflight support - Fix event listener accumulation in admin/node-tags.js and admin/members.js using AbortController with cleanup functions returned to the SPA router. lit-html reuses DOM elements across re-renders, causing addEventListener calls to accumulate and fire multiple times per form submission. - Rename admin routes from /a/ prefix to /admin/ for clarity - Add debug logging for admin route access and OIDC role checks - Move auth section in navbar after theme toggle - Update tests and AGENTS.md accordingly
This commit is contained in:
@@ -93,10 +93,10 @@ Role assignment flow:
|
||||
```
|
||||
Browser Web App (:8080) OIDC Provider (IdP)
|
||||
| | |
|
||||
| GET /a/node-tags | |
|
||||
| GET /admin/node-tags | |
|
||||
|------------------------------>| |
|
||||
| | No session |
|
||||
| 302 /auth/login?next=/a/node-tags |
|
||||
| 302 /auth/login?next=/admin/node-tags |
|
||||
|<------------------------------| |
|
||||
| | |
|
||||
| GET /auth/login | |
|
||||
@@ -116,10 +116,10 @@ Browser Web App (:8080) OIDC Provider (IdP
|
||||
| |<------------------------------|
|
||||
| | Extract userinfo + roles |
|
||||
| | Set session cookie |
|
||||
| 302 → /a/node-tags | |
|
||||
| 302 → /admin/node-tags | |
|
||||
|<------------------------------| |
|
||||
| | |
|
||||
| GET /a/node-tags | |
|
||||
| GET /admin/node-tags | |
|
||||
|------------------------------>| |
|
||||
| | Session valid, role=admin |
|
||||
| | Proxy to API with api_key |
|
||||
|
||||
Reference in New Issue
Block a user