add: allow external proxy to proxy videos

This commit is contained in:
trisua 2025-04-26 22:28:08 -04:00
parent a114d862ae
commit 9bee739a45
2 changed files with 7 additions and 9 deletions

View file

@ -73,7 +73,11 @@ pub async fn proxy_request(
if let Some(ct) = stream.headers().get("Content-Type") {
let ct = ct.to_str().unwrap();
let bad_ct = ["text/html", "text/plain"];
if (!ct.starts_with("image/") && !ct.starts_with("font/")) | bad_ct.contains(&ct) {
if (!ct.starts_with("image/")
&& !ct.starts_with("font/")
&& !ct.starts_with("video/"))
| bad_ct.contains(&ct)
{
// if we got html, return default banner (likely an error page)
return (
[("Content-Type", "image/svg+xml")],