diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-11 11:39:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-11 11:39:59 +0200 |
commit | 34555bebf8e2a2caf2cb1cfd85280d140fcc3802 (patch) | |
tree | 9c5e5eb78891bb09d23ae3fe37fe3db69bb8a2d9 /support/nginx | |
parent | d732ec7b46caa2a0972f132894023fec6bc5dd6a (diff) | |
download | PeerTube-34555bebf8e2a2caf2cb1cfd85280d140fcc3802.tar.gz PeerTube-34555bebf8e2a2caf2cb1cfd85280d140fcc3802.tar.zst PeerTube-34555bebf8e2a2caf2cb1cfd85280d140fcc3802.zip |
Migrate from webseed to web-videos
Diffstat (limited to 'support/nginx')
-rw-r--r-- | support/nginx/peertube | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube index f5b9d131a..822f6f9ac 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube | |||
@@ -199,7 +199,7 @@ server { | |||
199 | alias /var/www/peertube/peertube-latest/client/dist/$1; | 199 | alias /var/www/peertube/peertube-latest/client/dist/$1; |
200 | } | 200 | } |
201 | 201 | ||
202 | location ~ ^(/static/(webseed|streaming-playlists)/private/)|^/download { | 202 | location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/download { |
203 | # We can't rate limit a try_files directive, so we need to duplicate @api | 203 | # We can't rate limit a try_files directive, so we need to duplicate @api |
204 | 204 | ||
205 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 205 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
@@ -212,16 +212,10 @@ server { | |||
212 | } | 212 | } |
213 | 213 | ||
214 | # Bypass PeerTube for performance reasons. Optional. | 214 | # Bypass PeerTube for performance reasons. Optional. |
215 | location ~ ^/static/(webseed|redundancy|streaming-playlists)/ { | 215 | location ~ ^/static/(webseed|web-videos|redundancy|streaming-playlists)/ { |
216 | limit_rate_after 5M; | 216 | limit_rate_after 5M; |
217 | 217 | ||
218 | # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client | 218 | set $peertube_limit_rate 5M; |
219 | set $peertube_limit_rate 800k; | ||
220 | |||
221 | # Increase rate limit in HLS mode, because we don't have multiple simultaneous connections | ||
222 | if ($request_uri ~ -fragmented.mp4$) { | ||
223 | set $peertube_limit_rate 5M; | ||
224 | } | ||
225 | 219 | ||
226 | # Use this line with nginx >= 1.17.0 | 220 | # Use this line with nginx >= 1.17.0 |
227 | limit_rate $peertube_limit_rate; | 221 | limit_rate $peertube_limit_rate; |