fix(atc): whitelist /api/atc/ routes in auth middleware

The global auth middleware was blocking /api/atc/route and /api/atc/ptt
(only /api/atc/say was whitelisted from the old system). Now all /api/atc/
routes are excluded from auth, matching the Live ATC v2 architecture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
itsrubberduck
2026-02-15 00:24:01 +01:00
parent cc3681bbe6
commit cd272e2b6c

View File

@@ -6,7 +6,7 @@ export default defineEventHandler(async (event) => {
if (!url.pathname.startsWith('/api/')) {
return
}
if (url.pathname.startsWith('/api/atc/say')) {
if (url.pathname.startsWith('/api/atc/')) {
return
}
if (url.pathname.startsWith('/api/service/')) {
@@ -15,9 +15,7 @@ export default defineEventHandler(async (event) => {
if (url.pathname.startsWith('/api/bridge/')) {
return
}
if (url.pathname === '/api/decision-flows/runtime') {
return
}
// /api/decision-flows/ was removed in Live ATC v2
if (event.node.req.method === 'OPTIONS') {
return
}