aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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