diff --git a/README.md b/README.md index 0268a52..decb9f9 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ The server can be customized with the following environment variables: - `TURN_HOST` – Hostname or IP address of the TURN server. Defaults to `127.0.0.1`. - `TURN_REALM` – Realm used when generating TURN credentials. Defaults to `file.pizza`. - `STUN_SERVER` – STUN server URL to use when `COTURN_ENABLED` is disabled. Defaults to `stun:stun.l.google.com:19302`. +- `PEERJS_HOST` – Hostname or IP address to the self-hosted PeerJS server. Defaults to `0.peerjs.com`. +- `PEERJS_PATH` – Path to self-hosted PeerJS server. Defaults to `/`. ## FAQ diff --git a/src/app/api/ice/route.ts b/src/app/api/ice/route.ts index a4d802b..fe965ef 100644 --- a/src/app/api/ice/route.ts +++ b/src/app/api/ice/route.ts @@ -4,10 +4,7 @@ import { setTurnCredentials } from '../../../coturn' const turnHost = process.env.TURN_HOST || '127.0.0.1' const stunServer = process.env.STUN_SERVER || 'stun:stun.l.google.com:19302' - -// PATCH(gingermuffin): -// Create host and path to local peerjs -const peerjsHost = process.env.PEERJS_HOST || '127.0.0.1' +const peerjsHost = process.env.PEERJS_HOST || '0.peerjs.com' const peerjsPath = process.env.PEERJS_PATH || '/' export async function POST(): Promise {