Removed transcoding support (#271)
This commit is contained in:
parent
390dcfd06f
commit
36a0a4df4f
7 changed files with 60 additions and 146 deletions
|
|
@ -26,7 +26,6 @@ http {
|
|||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
proxy_cache_path /tmp/funkwhale-transcode levels=1:2 keys_zone=transcode:10m max_size=1g inactive=24h use_temp_path=off;
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
|
|
@ -46,38 +45,6 @@ http {
|
|||
internal;
|
||||
alias /music;
|
||||
}
|
||||
location = /transcode-auth {
|
||||
# needed so we can authenticate transcode requests, but still
|
||||
# cache the result
|
||||
internal;
|
||||
set $query '';
|
||||
# ensure we actually pass the jwt to the underlytin auth url
|
||||
if ($request_uri ~* "[^\?]+\?(.*)$") {
|
||||
set $query $1;
|
||||
}
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
proxy_pass http://api:12081/api/v1/trackfiles/viewable/?$query;
|
||||
proxy_pass_request_body off;
|
||||
proxy_set_header Content-Length "";
|
||||
}
|
||||
|
||||
location /api/v1/trackfiles/transcode/ {
|
||||
# this block deals with authenticating and caching transcoding
|
||||
# requests. Caching is heavily recommended as transcoding
|
||||
# is a CPU intensive process.
|
||||
auth_request /transcode-auth;
|
||||
if ($args ~ (.*)jwt=[^&]*(.*)) {
|
||||
set $cleaned_args $1$2;
|
||||
}
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
|
||||
proxy_cache transcode;
|
||||
proxy_cache_valid 200 7d;
|
||||
proxy_ignore_headers "Set-Cookie";
|
||||
proxy_hide_header "Set-Cookie";
|
||||
add_header X-Cache-Status $upstream_cache_status;
|
||||
proxy_pass http://api:12081;
|
||||
}
|
||||
location / {
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
proxy_pass http://api:12081/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue