From 077112b718eb29aecf331b1e703e7e90d8538e6c Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 13 Sep 2023 08:58:06 -0400 Subject: add some more scripts, change 2022 to emacsconf_year --- roles/media/templates/nginx-include | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'roles/media/templates/nginx-include') diff --git a/roles/media/templates/nginx-include b/roles/media/templates/nginx-include index 922bebb..03a7bfa 100644 --- a/roles/media/templates/nginx-include +++ b/roles/media/templates/nginx-include @@ -8,11 +8,16 @@ rewrite ^/{{ emacsconf_year }}/backstage/current/room/([^/]*)$ https://{{ media_ rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/pad/?$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect; rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/room/?$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect; } - {% if media_protect_root %} + {% if media_protect_root|bool %} location /{{ emacsconf_year }} { - auth_basic "Restricted"; - auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd; + # TODO: Figure out how to make this properly controlled by the variable + # auth_basic "Restricted"; + # auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd; autoindex on; + } + {% else %} + location /{{ emacsconf_year }} { + autoindex on; } {% endif %} location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics { -- cgit v1.2.3