Backend for WebRTC signaling. Handles session coordination and CORS configuration.
The backend primarily needs CORS configuration to allow frontend connections. You can set this in two ways:
appsettings.Production.json
Create or update appsettings.Production.json with:
{
"AllowedOrigins": [
"https://your-frontend-domain.com",
"https://another-allowed-origin.com"
]
}- Environment variables
Set each allowed origin via environment variables either through .env or managed hosting:
ALLOWEDORIGINS__0=https://your-frontend-domain.com
ALLOWEDORIGINS__1=https://another-allowed-origin.comWhen the backend starts in production, it will read the allowed origins and enforce CORS accordingly.