aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/nginx/peertube
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-11-23 10:45:42 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-03 10:15:49 +0100
commitd4132d3f56b392a2e4e632db59e6644e4851228e (patch)
treebe903734aa9ce3d669c40656a0f81bd3e9c7978c /support/nginx/peertube
parent4a54a93941d1c095bf249331df799c51e39c3774 (diff)
downloadPeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.gz
PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.zst
PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.zip
more explicit error messages for file uploads
Diffstat (limited to 'support/nginx/peertube')
-rw-r--r--support/nginx/peertube25
1 files changed, 11 insertions, 14 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube
index f1ef4ccd1..641d254af 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -62,9 +62,9 @@ server {
62 ## 62 ##
63 63
64 location @api { 64 location @api {
65 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 65 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
66 proxy_set_header Host $host; 66 proxy_set_header Host $host;
67 proxy_set_header X-Real-IP $remote_addr; 67 proxy_set_header X-Real-IP $remote_addr;
68 68
69 client_max_body_size 100k; # default is 1M 69 client_max_body_size 100k; # default is 1M
70 70
@@ -81,26 +81,23 @@ server {
81 } 81 }
82 82
83 location = /api/v1/users/me/avatar/pick { 83 location = /api/v1/users/me/avatar/pick {
84 limit_except POST { deny all; } 84 limit_except POST HEAD { deny all; }
85 85
86 client_max_body_size 2M; # default is 1M 86 client_max_body_size 2M; # default is 1M
87 add_header X-File-Maximum-Size 2M always; # inform backend of the set value in bytes
87 88
88 try_files /dev/null @api; 89 try_files /dev/null @api;
89 } 90 }
90 91
91 location = /api/v1/videos/upload { 92 location = /api/v1/videos/upload {
92 limit_except POST { deny all; } 93 limit_except POST HEAD { deny all; }
93 94
94 # This is the maximum upload size, which roughly matches the maximum size of a video file 95 # This is the maximum upload size, which roughly matches the maximum size of a video file.
95 # you can send via the API or the web interface. By default we set it to 8GB, but administrators
96 # can increase or decrease the limit. Currently there's no way to communicate this limit
97 # to users automatically, so you may want to leave a note in your instance 'about' page if
98 # you change this.
99 #
100 # Note that temporary space is needed equal to the total size of all concurrent uploads. 96 # Note that temporary space is needed equal to the total size of all concurrent uploads.
101 # This data gets stored in /var/lib/nginx by default, so you may want to put this directory 97 # This data gets stored in /var/lib/nginx by default, so you may want to put this directory
102 # on a dedicated filesystem. 98 # on a dedicated filesystem.
103 client_max_body_size 8G; # default is 1M 99 client_max_body_size 8G; # default is 1M
100 add_header X-File-Maximum-Size 8G always; # inform backend of the set value in bytes
104 101
105 try_files /dev/null @api; 102 try_files /dev/null @api;
106 } 103 }