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 11:32:20 +01:00
parent 7d69b4f5cf
commit 8b83dcc5d1

View file

@ -97,10 +97,10 @@ location ~ ^/plugins/[^/]+(/[^/]+)?/ws/ {
##
root __DATA_DIR__/storage/;
# Enable compression for JS/CSS/HTML, for improved client load times.
# It might be nice to compress JSON/XML as returned by the API, but
# leaving that out to protect against potential BREACH attack.
# Enable compression for JS/CSS/HTML, for improved client load times.
# It might be nice to compress JSON/XML as returned by the API, but
# leaving that out to protect against potential BREACH attack.
# gzip on;
gzip_vary on;
gzip_types # text/html is always compressed by HttpGzipModule
@ -134,7 +134,7 @@ tcp_nodelay on; # don't buffer data sent, good for small data burs
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png|default-playlist\.jpg|default-avatar-account\.png|default-avatar-account-48x48\.png|default-avatar-video-channel\.png|default-avatar-video-channel-48x48\.png))$ {
more_set_headers "Cache-Control : public, max-age=31536000, immutable"; # Cache 1 year
try_files __DATA_DIR__storage/client-overrides/$1 __INSTALL_DIR__/client/dist/$1 @api;
try_files __DATA_DIR__/storage/client-overrides/$1 __INSTALL_DIR__/client/dist/$1 @api;
}
# Bypass PeerTube for performance reasons. Optional.
@ -163,7 +163,7 @@ location ~ ^/static/(thumbnails|avatars)/ {
rewrite ^/static/(.*)$ /$1 break;
root __DATA_DIR__storage/;
root __DATA_DIR__/storage/;
try_files $uri @api;
}