(req: Request)
| 358 | } |
| 359 | |
| 360 | function getBaseUrl(req: Request): string { |
| 361 | if (process.env.BASE_URL) return process.env.BASE_URL.replace(/\/$/, ''); |
| 362 | const proto = req.headers['x-forwarded-proto'] || req.protocol || 'http'; |
| 363 | const host = req.headers['x-forwarded-host'] || req.headers.host || 'localhost'; |
| 364 | return `${proto}://${host}`; |
| 365 | } |
| 366 | |
| 367 | export function createTrainingAgentRouter(): Router { |
| 368 | const router = Router(); |
no outgoing calls
no test coverage detected