diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-12 10:04:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-12 10:04:18 +0100 |
commit | 6c7317a0a363a609e7bffc4306aef482bda088f1 (patch) | |
tree | 91b316dec8f503f5390f093b1ffe8093869cba0b /support | |
parent | e3b4c084cd0935dd93b1d737c4fc88c65ab5bcc1 (diff) | |
download | PeerTube-6c7317a0a363a609e7bffc4306aef482bda088f1.tar.gz PeerTube-6c7317a0a363a609e7bffc4306aef482bda088f1.tar.zst PeerTube-6c7317a0a363a609e7bffc4306aef482bda088f1.zip |
Fix nginx for small uploads
Diffstat (limited to 'support')
-rw-r--r-- | support/nginx/peertube | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube index 86564d33d..0993085d5 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube | |||
@@ -78,13 +78,6 @@ server { | |||
78 | try_files /dev/null @api; | 78 | try_files /dev/null @api; |
79 | } | 79 | } |
80 | 80 | ||
81 | location ~ ^/api/v1/(videos|video-playlists|users/me/avatar/pick)$ { | ||
82 | client_max_body_size 3M; # default is 1M | ||
83 | 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) | ||
84 | |||
85 | try_files /dev/null @api; | ||
86 | } | ||
87 | |||
88 | location = /api/v1/videos/upload { | 81 | location = /api/v1/videos/upload { |
89 | limit_except POST HEAD { deny all; } | 82 | limit_except POST HEAD { deny all; } |
90 | 83 | ||
@@ -98,6 +91,13 @@ server { | |||
98 | try_files /dev/null @api; | 91 | try_files /dev/null @api; |
99 | } | 92 | } |
100 | 93 | ||
94 | location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) { | ||
95 | client_max_body_size 3M; # default is 1M | ||
96 | 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) | ||
97 | |||
98 | try_files /dev/null @api; | ||
99 | } | ||
100 | |||
101 | ## | 101 | ## |
102 | # Websocket | 102 | # Websocket |
103 | ## | 103 | ## |