diff options
Diffstat (limited to '')
| -rw-r--r-- | roles/media/templates/nginx-include | 19 | ||||
| -rw-r--r-- | roles/media/templates/nginx-site-config | 23 |
2 files changed, 36 insertions, 6 deletions
diff --git a/roles/media/templates/nginx-include b/roles/media/templates/nginx-include index f80ed76..4d1eabe 100644 --- a/roles/media/templates/nginx-include +++ b/roles/media/templates/nginx-include @@ -12,15 +12,30 @@ location /{{ emacsconf_year }}/backstage { 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; - } + 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 %} diff --git a/roles/media/templates/nginx-site-config b/roles/media/templates/nginx-site-config index 4dbdaaa..f6a83b1 100644 --- a/roles/media/templates/nginx-site-config +++ b/roles/media/templates/nginx-site-config @@ -1,5 +1,20 @@ server { - listen 80; - server_name {{ media_server_name }}; - root /var/www/{{ media_server_name }}; -}
\ No newline at end of file + listen 80; + server_name {{ media_server_name }}; + root /var/www/{{ media_server_name }}; + error_page 404 403 /404.html; + location / { + add_header Cache-Control "no-store, no-cache, must-revalidate"; + add_header Pragma "no-cache"; + expires 0; + } + types { + text/plain org; + } + + location ~* \.vtt$ { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires "0"; + } +} |
