1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 02:34:38 -05:00

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> { async fn proxy(url: String) -> Result<Bytes, Error> {
let (mut resp, mime) = fetch(&url).await?; 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?; let bytes = get_bytes(&mut resp).await?;
Ok(bytes) Ok(bytes)
} else { } else {