aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-10 21:21:19 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-10 21:21:19 +0200
commit1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60 (patch)
tree2a3499b92eeb46c2890c56e8d837ea3521eda0a8
parent3474b77cbfb6628efa7bbe56ba0418e7607e3bea (diff)
downloadPeerTube-1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60.tar.gz
PeerTube-1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60.tar.zst
PeerTube-1f0f84c27ecadeb02d5ac0b188d73b84c7c40f60.zip
Update NGinx that bypass /static/webseed (better performances)
-rw-r--r--support/nginx/peertube21
1 files changed, 21 insertions, 0 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube
index 21939c360..0f7fcb494 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -12,6 +12,27 @@ server {
12 client_max_body_size 100m; 12 client_max_body_size 100m;
13 } 13 }
14 14
15 # Bypass PeerTube webseed route for better performances
16 location /static/webseed {
17 if ($request_method = 'OPTIONS') {
18 add_header 'Access-Control-Allow-Origin' '*';
19 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
20 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
21 add_header 'Access-Control-Max-Age' 1728000;
22 add_header 'Content-Type' 'text/plain charset=UTF-8';
23 add_header 'Content-Length' 0;
24 return 204;
25 }
26
27 if ($request_method = 'GET') {
28 add_header 'Access-Control-Allow-Origin' '*';
29 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
30 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
31 }
32
33 alias /your/installation/PeerTube/uploads;
34 }
35
15 # Websocket tracker 36 # Websocket tracker
16 location /tracker/socket { 37 location /tracker/socket {
17 # Peers send a message to the tracker every 15 minutes 38 # Peers send a message to the tracker every 15 minutes