aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/nginx/peertube
diff options
context:
space:
mode:
Diffstat (limited to 'support/nginx/peertube')
-rw-r--r--support/nginx/peertube16
1 files changed, 16 insertions, 0 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube
index e4f625ce4..201d95ea2 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -54,6 +54,22 @@ server {
54 } 54 }
55 55
56 location ~ ^/static/(thumbnails|avatars)/(.*)$ { 56 location ~ ^/static/(thumbnails|avatars)/(.*)$ {
57 if ($request_method = 'OPTIONS') {
58 add_header 'Access-Control-Allow-Origin' '*';
59 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
60 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
61 add_header 'Access-Control-Max-Age' 1728000;
62 add_header 'Content-Type' 'text/plain charset=UTF-8';
63 add_header 'Content-Length' 0;
64 return 204;
65 }
66
67 if ($request_method = 'GET') {
68 add_header 'Access-Control-Allow-Origin' '*';
69 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
70 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
71 }
72
57 # Cache 2 hours 73 # Cache 2 hours
58 add_header Cache-Control "public, max-age=7200"; 74 add_header Cache-Control "public, max-age=7200";
59 75