()
| 18 | let adapterSubClient: RedisClientType | null = null |
| 19 | |
| 20 | function getAllowedOrigins(): string[] { |
| 21 | const allowedOrigins = [ |
| 22 | getBaseUrl(), |
| 23 | 'http://localhost:3000', |
| 24 | 'http://localhost:3001', |
| 25 | ...(env.ALLOWED_ORIGINS?.split(',') || []), |
| 26 | ].filter((url): url is string => Boolean(url)) |
| 27 | |
| 28 | logger.info('Socket.IO CORS configuration:', { allowedOrigins }) |
| 29 | |
| 30 | return allowedOrigins |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Create and configure a Socket.IO server instance. |
no test coverage detected