add: allow external proxy to proxy videos
This commit is contained in:
parent
a114d862ae
commit
9bee739a45
2 changed files with 7 additions and 9 deletions
|
@ -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")],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue