From 0f003942a5f2758e39352cc27a2c48f2ae439406 Mon Sep 17 00:00:00 2001 From: marvinlehmann Date: Thu, 5 Nov 2020 02:40:01 +0100 Subject: [PATCH] Update 'README.md' Add information about simple authentication. --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 97f0347..38c81ce 100644 --- a/README.md +++ b/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; + } + } +} + +``` \ No newline at end of file