summaryrefslogblamecommitdiffstats
path: root/roles/media/templates/nginx-include
blob: 4d1eabe01f596ba30147da412a8bbe5d558faef2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                                                             
                                          











                                                                                                                                                                              





                                                                       
                                                               




                                                                     
                                                   
                          


                                                                           

                                           
                                                                              
                          


                                                                           
         
                      
                           

                                                                                   
                                                                                                            







                                   
rewrite ^/current/bbb-open.html$ {{ bbb_open_url }} redirect;
location /{{ emacsconf_year }}/backstage {
   auth_basic "Restricted";
   auth_basic_user_file /etc/nginx/sites-available/{{ media_server_name }}-{{ emacsconf_year }}-htpasswd;
   autoindex on;
   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;
   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;
	 add_header Cache-Control no-cache;
	 if_modified_since off;
   expires off;
   etag off;
}
    location ~* \.vtt$ {
        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires "0";
    }

	location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics {
      auth_basic off;
      add_header Cache-Control "no-cache, no-store, must-revalidate";
      add_header Pragma "no-cache";
      add_header Expires "0";
}
        location /{{ emacsconf_year }}/schedules/ {
           auth_basic off;
            add_header Cache-Control "no-cache, no-store, must-revalidate";
            add_header Pragma "no-cache";
            add_header Expires "0";
        }
        {% for track in emacsconf_tracks %}
        location /{{ emacsconf_year }}/{{ emacsconf_id }}-{{ track.id }}.ics {
           auth_basic off;
            add_header Cache-Control "no-cache, no-store, must-revalidate";
            add_header Pragma "no-cache";
            add_header Expires "0";
        }
        {% endfor %}  
{% if media_protect_root %}
   location /{{ emacsconf_year }} {
	    # TODO: Figure out how to make this properly controlled by the variable
      auth_basic_user_file /etc/nginx/sites-available/{{ media_server_name }}-{{ emacsconf_year }}-htpasswd;
      auth_basic "Restricted";
      autoindex on;
	 }
{% else %}
   location /{{ emacsconf_year }} {
      autoindex on;
   }
{% endif %}