Fix image transcoding check.

This commit is contained in:
Kavin 2023-09-29 13:00:33 +01:00
parent 30c0926f2e
commit 3d99bdd454
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
if rewrite {
if let Some(content_type) = resp.headers().get("content-type") {
#[cfg(feature = "avif")]
if disallow_image_transcoding
if !disallow_image_transcoding
&& (content_type == "image/webp" || content_type == "image/jpeg" && avif)
{
let resp_bytes = resp.bytes().await.unwrap();