This commit is contained in:
Simon
2026-03-22 15:56:25 +00:00
parent 52f108da8e
commit fbe04fc752
12 changed files with 4960 additions and 26 deletions

View File

@@ -14,8 +14,7 @@ const FIREFOX_USER_AGENT: &str =
"Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0";
const HTML_ACCEPT: &str =
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8";
const IMAGE_ACCEPT: &str =
"image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5";
const IMAGE_ACCEPT: &str = "image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5";
#[derive(Debug, Clone)]
pub struct NoodlemagazineProxy {}
@@ -321,11 +320,7 @@ pub async fn get_image(
if needs_warmup {
let _ = requester
.get_with_headers(
image_url.as_str(),
headers.clone(),
Some(Version::HTTP_11),
)
.get_with_headers(image_url.as_str(), headers.clone(), Some(Version::HTTP_11))
.await;
headers = NoodlemagazineProxy::image_headers(&requester, image_url.as_str());
upstream = requester