mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-01 14:16:05 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user