···
552
+
locations."~ ^/plugins/[^/]+(/[^/]+)?/ws/" = {
553
+
tryFiles = "/dev/null @api_websocket";
locations."@api_websocket" = {
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
···
585
-
locations."~ ^/lazy-static/(avatars|banners)/" = {
590
+
locations."^~ /lazy-static/avatars/" = {
root = cfg.settings.storage.avatars;
···
add_header Cache-Control 'public, max-age=7200';
rewrite ^/lazy-static/avatars/(.*)$ /$1 break;
611
+
locations."^~ /lazy-static/banners/" = {
612
+
tryFiles = "$uri @api";
613
+
root = cfg.settings.storage.avatars;
616
+
if ($request_method = 'OPTIONS') {
617
+
${nginxCommonHeaders}
618
+
add_header Access-Control-Max-Age 1728000;
619
+
add_header Cache-Control 'no-cache';
620
+
add_header Content-Type 'text/plain charset=UTF-8';
621
+
add_header Content-Length 0;
625
+
${nginxCommonHeaders}
626
+
add_header Cache-Control 'public, max-age=7200';
rewrite ^/lazy-static/banners/(.*)$ /$1 break;
···
locations."^~ /lazy-static/previews/" = {
root = cfg.settings.storage.previews;
if ($request_method = 'OPTIONS') {
···
653
+
locations."^~ /static/streaming-playlists/private/" = {
654
+
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
657
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
658
+
proxy_set_header Host $host;
659
+
proxy_set_header X-Real-IP $remote_addr;
661
+
proxy_limit_rate 5M;
665
+
locations."^~ /static/webseed/private/" = {
666
+
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
669
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
670
+
proxy_set_header Host $host;
671
+
proxy_set_header X-Real-IP $remote_addr;
673
+
proxy_limit_rate 5M;
locations."^~ /static/thumbnails/" = {
root = cfg.settings.storage.thumbnails;
if ($request_method = 'OPTIONS') {
···
locations."^~ /static/redundancy/" = {
root = cfg.settings.storage.redundancy;
703
+
set $peertube_limit_rate 800k;
705
+
if ($request_uri ~ -fragmented.mp4$) {
706
+
set $peertube_limit_rate 5M;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Max-Age 1728000;
···
726
+
limit_rate $peertube_limit_rate;
672
-
set $peertube_limit_rate 800k;
673
-
set $limit_rate $peertube_limit_rate;
rewrite ^/static/redundancy/(.*)$ /$1 break;
···
locations."^~ /static/streaming-playlists/" = {
root = cfg.settings.storage.streaming_playlists;
738
+
set $peertube_limit_rate 800k;
740
+
if ($request_uri ~ -fragmented.mp4$) {
741
+
set $peertube_limit_rate 5M;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Max-Age 1728000;
···
761
+
limit_rate $peertube_limit_rate;
703
-
set $peertube_limit_rate 5M;
704
-
set $limit_rate $peertube_limit_rate;
rewrite ^/static/streaming-playlists/(.*)$ /$1 break;
710
-
locations."~ ^/static/webseed/" = {
768
+
locations."^~ /static/webseed/" = {
root = cfg.settings.storage.videos;
773
+
set $peertube_limit_rate 800k;
775
+
if ($request_uri ~ -fragmented.mp4$) {
776
+
set $peertube_limit_rate 5M;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Max-Age 1728000;
···
796
+
limit_rate $peertube_limit_rate;
734
-
set $peertube_limit_rate 800k;
735
-
set $limit_rate $peertube_limit_rate;
rewrite ^/static/webseed/(.*)$ /$1 break;