()
| 67 | const DRAIN_PATH = "/api/queue/plugin-scans/drain"; |
| 68 | |
| 69 | function drainBaseUrl(): string { |
| 70 | // VERCEL_URL is set on every Vercel deployment (production & preview). |
| 71 | // Local dev falls back to NEXT_PUBLIC_APP_URL, which the rest of the app |
| 72 | // already uses for absolute URLs. |
| 73 | if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; |
| 74 | return process.env.NEXT_PUBLIC_APP_URL ?? "http://localhost:3000"; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Fire a non-blocking GET at the drain route after the response has been |
no outgoing calls
no test coverage detected