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
|
@ -420,11 +420,7 @@
|
|||
params.append("code_challenge_method", "S256");
|
||||
params.append("code_challenge", challenge);
|
||||
|
||||
window.open(
|
||||
`https://accounts.spotify.com/authorize?${params.toString()}`,
|
||||
);
|
||||
|
||||
window.location.reload();
|
||||
window.location.href = `https://accounts.spotify.com/authorize?${params.toString()}`;
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -621,9 +617,7 @@
|
|||
`${window.location.origin}/auth/connections_link/LastFm`,
|
||||
);
|
||||
|
||||
window.open(`https://last.fm/api/auth?${params.toString()}`);
|
||||
|
||||
window.location.reload();
|
||||
window.location.href = `https://last.fm/api/auth?${params.toString()}`;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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