Update 'README.md'
Add information about simple authentication.
This commit is contained in:
41
README.md
41
README.md
@@ -1,2 +1,43 @@
|
||||
# nginx-rtmp-docker
|
||||
|
||||
## simple authentication
|
||||
|
||||
**nginx.conf:**
|
||||
```
|
||||
worker_processes auto;
|
||||
rtmp_auto_push on;
|
||||
|
||||
events {}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location /auth {
|
||||
if ($arg_pw = 'password') {
|
||||
return 200;
|
||||
}
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rtmp {
|
||||
server {
|
||||
listen 1935;
|
||||
listen [::]:1935;
|
||||
|
||||
# 'get' to use $arg_ for auth
|
||||
notify_method get;
|
||||
|
||||
application live {
|
||||
live on;
|
||||
record off;
|
||||
|
||||
on_publish http://127.0.0.1/auth;
|
||||
on_play http://127.0.0.1/auth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user