diff options
Diffstat (limited to 'roles/media/templates/nginx-include')
-rw-r--r-- | roles/media/templates/nginx-include | 11 |
1 files changed, 8 insertions, 3 deletions
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 { |