|
17 | 17 | - [Docker](#docker) |
18 | 18 | - [Docker Compose](#docker-compose) |
19 | 19 | - [Environment variables](#environment-variables) |
20 | | - - [Webhook - Authentication and Logging](#webhook---authentication-and-logging) |
| 20 | + - [Webhooks](#webhooks) |
21 | 21 | - [Network Test on Start](#network-test-on-start) |
22 | 22 | - [Design](#design) |
23 | 23 |
|
@@ -198,7 +198,7 @@ The frontend can be configured by passing these URL Parameters. |
198 | 198 | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | |
199 | 199 | | `STREAM_PROFILE_PATH` | Path to store stream profile configurations. | |
200 | 200 | | `STREAM_PROFILE_POLICY` | Policy configuration for stream profiles. Default is 'Anyone' See [Stream Profile Policy](#stream-profile-policy). | |
201 | | -| `WEBHOOK_URL` | URL for webhook backend used for authentication and logging. see [Webhook - Authentication and Logging](#webhook---authentication-and-logging). | |
| 201 | +| `WEBHOOK_URL` | URL for webhook backend used for authentication and logging. see [Webhooks](#webhooks). | |
202 | 202 |
|
203 | 203 | ### Frontend Configuration |
204 | 204 |
|
@@ -262,12 +262,11 @@ The `STREAM_PROFILE_POLICY` environment variable controls who is allowed to init |
262 | 262 | | `ANYONE_WITH_RESERVED` | If Stream keys are reserved in advance, only a valid token can be used with them. If not reserved, anyone can used the streamkey | |
263 | 263 | | `RESERVED` | Only users with a valid token **and** a reserved stream key are allowed to stream. This is the most restrictive mode. | |
264 | 264 |
|
265 | | -## Webhook - Authentication and Logging |
| 265 | +## Webhooks |
266 | 266 |
|
267 | | -To prevent random users from streaming to your server, you can set the `WEBHOOK_URL` and validate/process requests in your code. This enables you to separate the authorization between broadcasting (whip) and watching (whep). So you can safely share a watch link without exposing the key used for broadcasting. |
| 267 | +When `WEBHOOK_URL` is set Broadcast Box sends a webhook for every publish and subscribe. If this webhook is rejected the video session is disconnected. |
268 | 268 |
|
269 | | -If the request succeeds (meaning the stream key is accepted), broadcast-box redirects the stream to an url given |
270 | | -by the external server, otherwise the streaming request is dropped. |
| 269 | +This enables you to implement authorization or logging for broadcasting (WHIP) and subscribing (WHEP) independently. |
271 | 270 |
|
272 | 271 | See [here](examples/webhook-server/main.go). For an example Webhook Server that only allows the stream `broadcastBoxRulez` |
273 | 272 |
|
|
0 commit comments