mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
Several fixes
This commit is contained in:
parent
0bd764e8e4
commit
e81b32e9d4
3 changed files with 11 additions and 10 deletions
|
@ -1,7 +1,8 @@
|
|||
more_set_headers "X-Frame-Options : ALLOWALL";
|
||||
##
|
||||
# Application
|
||||
##
|
||||
|
||||
##
|
||||
# Application
|
||||
##
|
||||
|
||||
location @api {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
@ -15,7 +16,7 @@ location @api {
|
|||
proxy_read_timeout 10m;
|
||||
send_timeout 10m;
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
@ -37,14 +38,14 @@ location = /api/v1/videos/upload {
|
|||
# This data gets stored in /var/lib/nginx by default, so you may want to put this directory
|
||||
# on a dedicated filesystem.
|
||||
client_max_body_size 12G; # default is 1M
|
||||
add_header X-File-Maximum-Size 8G 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 : 8G always"; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
|
||||
|
||||
try_files /dev/null @api;
|
||||
}
|
||||
|
||||
location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
|
||||
client_max_body_size 3M; # default is 1M
|
||||
add_header X-File-Maximum-Size 2M 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 : 2M always"; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
|
||||
|
||||
try_files /dev/null @api;
|
||||
}
|
||||
|
@ -61,7 +62,7 @@ location @api_websocket {
|
|||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
}
|
||||
|
||||
location /socket.io {
|
||||
|
@ -116,7 +117,7 @@ tcp_nodelay on; # don't buffer data sent, good for small data burs
|
|||
# Bypass PeerTube for performance reasons. Optional.
|
||||
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
|
||||
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))$ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||
more_set_headers "Cache-Control : public, max-age=31536000, immutable"; # Cache 1 year
|
||||
|
||||
try_files __DATADIR__/client-overrides/$1 __FINALPATH__/client/dist/$1 @api;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ chown -R "$app":"$app" $final_path
|
|||
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -246,7 +246,7 @@ chown -R "$app":"$app" $final_path
|
|||
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue