1
Fork 0

add more proxy types

This commit is contained in:
Ashley 2023-12-19 14:11:40 +00:00
parent de6756c104
commit 982152267c

View file

@ -26,7 +26,7 @@ pub struct Parameters {
async fn proxy(url: String) -> Result<Bytes, Error> {
let (mut resp, mime) = fetch(&url).await?;
if matches!(mime.type_(), mime::IMAGE | mime::VIDEO) {
if matches!(mime.type_(), mime::IMAGE | mime::VIDEO | mime::CSS | mime::TEXT_CSS | mime::TEXT_CSS_UTF8 | mime::FONT | mime::FONT_WOFF | mime::FONT_WOFF2 | mime::WOFF | mime::WOFF2) {
let bytes = get_bytes(&mut resp).await?;
Ok(bytes)
} else {