Skip to content

Commit 42fd930

Browse files
committed
Cleanup Webhook Documentation
1 parent d270762 commit 42fd930

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [Docker](#docker)
1818
- [Docker Compose](#docker-compose)
1919
- [Environment variables](#environment-variables)
20-
- [Webhook - Authentication and Logging](#webhook---authentication-and-logging)
20+
- [Webhooks](#webhooks)
2121
- [Network Test on Start](#network-test-on-start)
2222
- [Design](#design)
2323

@@ -198,7 +198,7 @@ The frontend can be configured by passing these URL Parameters.
198198
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
199199
| `STREAM_PROFILE_PATH` | Path to store stream profile configurations. |
200200
| `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). |
202202

203203
### Frontend Configuration
204204

@@ -262,12 +262,11 @@ The `STREAM_PROFILE_POLICY` environment variable controls who is allowed to init
262262
| `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 |
263263
| `RESERVED` | Only users with a valid token **and** a reserved stream key are allowed to stream. This is the most restrictive mode. |
264264

265-
## Webhook - Authentication and Logging
265+
## Webhooks
266266

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.
268268

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.
271270

272271
See [here](examples/webhook-server/main.go). For an example Webhook Server that only allows the stream `broadcastBoxRulez`
273272

0 commit comments

Comments
 (0)