53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
add_header Onion-Location http://pt.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
|
|
|
##
|
|
# Application
|
|
##
|
|
|
|
access_log /var/log/nginx/peertube.access.log; # reduce I/0 with buffer=10m flush=5m
|
|
error_log /var/log/nginx/peertube.error.log;
|
|
|
|
location @api {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
client_max_body_size 100k; # default is 1M
|
|
|
|
proxy_connect_timeout 10m;
|
|
proxy_send_timeout 10m;
|
|
proxy_read_timeout 10m;
|
|
send_timeout 10m;
|
|
|
|
proxy_pass http://ptbackend;
|
|
}
|
|
|
|
location / {
|
|
try_files /dev/null @api;
|
|
}
|
|
|
|
location = /api/v1/videos/upload-resumable {
|
|
client_max_body_size 0;
|
|
proxy_request_buffering off;
|
|
|
|
try_files /dev/null @api;
|
|
}
|
|
|
|
location ~ ^/api/v1/videos/(upload|([^/]+/studio/edit))$ {
|
|
limit_except POST HEAD { deny all; }
|
|
|
|
# This is the maximum upload size, which roughly matches the maximum size of a video file.
|
|
# 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
|
|
# 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)
|
|
|
|
try_files /dev/null @api;
|
|
}
|
|
|
|
location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
|
|
client_max_body_size 6M; # default is 1M
|
|
add_header X-File-Maximum-Size 4M always; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size)
|
|
}
|