MCPcopy
hub / github.com/simstudioai/sim / getAllowedOrigins

Function getAllowedOrigins

apps/realtime/src/config/socket.ts:20–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18let adapterSubClient: RedisClientType | null = null
19
20function 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.

Callers 1

createSocketIOServerFunction · 0.85

Calls 2

getBaseUrlFunction · 0.90
infoMethod · 0.80

Tested by

no test coverage detected