1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Update nginx.conf

This commit is contained in:
Éric Gaspar 2023-12-29 18:51:24 +01:00
parent 5b3a24c6fe
commit f0c3056f78

View file

@ -39,7 +39,7 @@ location ~ ^/api/v1/videos/(upload|([^/]+/studio/edit))$ {
# Note that temporary space is needed equal to the total size of all concurrent uploads. # Note that temporary space is needed equal to the total size of all concurrent uploads.
# This data gets stored in /var/lib/nginx by default, so you may want to put this directory # This data gets stored in /var/lib/nginx by default, so you may want to put this directory
# on a dedicated filesystem. # on a dedicated filesystem.
client_max_body_size 24G; # default is 1M client_max_body_size 24G; # default is 1M
more_set_headers "X-File-Maximum-Size : 16G always"; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size) more_set_headers "X-File-Maximum-Size : 16G always"; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
try_files /dev/null @api; try_files /dev/null @api;
@ -168,7 +168,7 @@ location ~ ^/static/(thumbnails|avatars)/ {
try_files $uri @api; try_files $uri @api;
} }
location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/download { location ~ ^(/static/(webseed|videos|streaming-playlists)/private/)|^/download {
# We can't rate limit a try_files directive, so we need to duplicate @api # We can't rate limit a try_files directive, so we need to duplicate @api
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -181,7 +181,7 @@ location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/downlo
} }
# Bypass PeerTube for performance reasons. Optional. # Bypass PeerTube for performance reasons. Optional.
location ~ ^/static/(webseed|web-videos|redundancy|streaming-playlists)/ { location ~ ^/static/(webseed|videos|redundancy|streaming-playlists)/ {
limit_rate_after 5M; limit_rate_after 5M;
set $peertube_limit_rate 5M; set $peertube_limit_rate 5M;
@ -217,7 +217,7 @@ location ~ ^/static/(webseed|web-videos|redundancy|streaming-playlists)/ {
aio threads; aio threads;
# web-videos is the name of the directory mapped to the `storage.web_videos` key in your PeerTube configuration # web-videos is the name of the directory mapped to the `storage.web_videos` key in your PeerTube configuration
rewrite ^/static/webseed/(.*)$ /web-videos/$1 break; rewrite ^/static/webseed/(.*)$ /videos/$1 break;
rewrite ^/static/(.*)$ /$1 break; rewrite ^/static/(.*)$ /$1 break;
root __DATA_DIR__/storage/; root __DATA_DIR__/storage/;