summaryrefslogtreecommitdiffstats
path: root/roles/stream/templates/emacsconf.nginx.conf
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
committerSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
commit2be81b299be9cad0b03495f2ea038a01969c6cb2 (patch)
tree6f798cdf8233d0c1079eaff3a52fd3bdabf8bdf7 /roles/stream/templates/emacsconf.nginx.conf
parenta50799ae2d27ea57f9f470a9ecfb06dd77499c34 (diff)
downloademacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.tar.xz
emacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.zip
Update for new ansible version
Diffstat (limited to 'roles/stream/templates/emacsconf.nginx.conf')
-rw-r--r--roles/stream/templates/emacsconf.nginx.conf9
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/stream/templates/emacsconf.nginx.conf b/roles/stream/templates/emacsconf.nginx.conf
index ac84ef5..cf5e2b8 100644
--- a/roles/stream/templates/emacsconf.nginx.conf
+++ b/roles/stream/templates/emacsconf.nginx.conf
@@ -11,6 +11,10 @@ location ~ ^/((gen|dev)(-480p|-fallback)?.webm)$ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
+ {% if protect_stream_with_password %}
+ auth_basic {{ emacsconf_name }};
+ auth_basic_user_file /etc/nginx/{{ emacsconf_id }}-htpasswd;
+ {% endif %}
}
location ~ ^/emacsconf/(.*)$ {
@@ -26,5 +30,8 @@ location ~ ^/emacsconf/(.*)$ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
+ {% if protect_stream_with_password %}
+ auth_basic {{ emacsconf_name }};
+ auth_basic_user_file /etc/nginx/{{ emacsconf_id }}-htpasswd;
+ {% endif %}
}
- \ No newline at end of file