From f6bdf68e5e488b18aafa796cf5d16db6008ae6dc Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 8 May 2025 12:19:13 -0400 Subject: [PATCH] add mising `/download` endpoint from companion on the webserver configurations Required for download to work on invidious due to commit: https://github.com/iv-org/invidious/commit/8fd0b82c387dfd10f427c8267526223ba4dc1fce --- docs/companion-apache2.md | 4 ++++ docs/companion-caddy.md | 1 + docs/companion-nginx.md | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/docs/companion-apache2.md b/docs/companion-apache2.md index 829be64..1332e07 100644 --- a/docs/companion-apache2.md +++ b/docs/companion-apache2.md @@ -18,6 +18,8 @@ ProxyPassReverse /api/manifest/dash/id/ http://127.0.0.1:8282/ ProxyPass /videoplayback http://127.0.0.1:8282/ nocanon ProxyPassReverse /videoplayback http://127.0.0.1:8282/ + ProxyPass /download http://127.0.0.1:8282/ nocanon + ProxyPassReverse /download http://127.0.0.1:8282/ AllowEncodedSlashes on @@ -68,6 +70,8 @@ To make the VirtualHost config below actually work, you should as well: ProxyPassReverse /api/manifest/dash/id/ http://127.0.0.1:8282/ ProxyPass /videoplayback http://127.0.0.1:8282/ nocanon ProxyPassReverse /videoplayback http://127.0.0.1:8282/ + ProxyPass /download http://127.0.0.1:8282/ nocanon + ProxyPassReverse /download http://127.0.0.1:8282/ ProxyPreserveHost On ProxyRequests Off AllowEncodedSlashes On diff --git a/docs/companion-caddy.md b/docs/companion-caddy.md index f693e08..62f8709 100644 --- a/docs/companion-caddy.md +++ b/docs/companion-caddy.md @@ -10,6 +10,7 @@ https:// { path /latest_version path /api/manifest/dash/id/* path /videoplayback* + path /download* } reverse_proxy @companion localhost:8282 diff --git a/docs/companion-nginx.md b/docs/companion-nginx.md index 4620475..b30e260 100644 --- a/docs/companion-nginx.md +++ b/docs/companion-nginx.md @@ -50,6 +50,14 @@ server { proxy_set_header Connection ""; # to keep alive } + location /download { + proxy_pass http://127.0.0.1:8282; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; # so Invidious companion knows domain + proxy_http_version 1.1; # to keep alive + proxy_set_header Connection ""; # to keep alive + } + if ($https = '') { return 301 https://$host$request_uri; } # if not connected to HTTPS, perma-redirect to HTTPS } ```