aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/nginx/peertube22
1 files changed, 0 insertions, 22 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube
index 05a59c072..f5b9d131a 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -199,28 +199,6 @@ server {
199 alias /var/www/peertube/peertube-latest/client/dist/$1; 199 alias /var/www/peertube/peertube-latest/client/dist/$1;
200 } 200 }
201 201
202 # Bypass PeerTube for performance reasons. Optional.
203 location ~ ^/static/(thumbnails|avatars)/ {
204 if ($request_method = 'OPTIONS') {
205 add_header Access-Control-Allow-Origin '*';
206 add_header Access-Control-Allow-Methods 'GET, OPTIONS';
207 add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
208 add_header Access-Control-Max-Age 1728000; # Preflight request can be cached 20 days
209 add_header Content-Type 'text/plain charset=UTF-8';
210 add_header Content-Length 0;
211 return 204;
212 }
213
214 add_header Access-Control-Allow-Origin '*';
215 add_header Access-Control-Allow-Methods 'GET, OPTIONS';
216 add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
217 add_header Cache-Control "public, max-age=7200"; # Cache response 2 hours
218
219 rewrite ^/static/(.*)$ /$1 break;
220
221 try_files $uri @api;
222 }
223
224 location ~ ^(/static/(webseed|streaming-playlists)/private/)|^/download { 202 location ~ ^(/static/(webseed|streaming-playlists)/private/)|^/download {
225 # We can't rate limit a try_files directive, so we need to duplicate @api 203 # We can't rate limit a try_files directive, so we need to duplicate @api
226 204