1
0
Эх сурвалжийг харах

Fix Vary header when JPEG XL supoprt detection is enabled

DarthSim 2 сар өмнө
parent
commit
8967bf7f82
2 өөрчлөгдсөн 7 нэмэгдсэн , 1 устгасан
  1. 1 0
      CHANGELOG.md
  2. 6 1
      processing_handler.go

+ 1 - 0
CHANGELOG.md

@@ -2,6 +2,7 @@
 
 ## [Unreleased]
 ### Fixed
+- Fix the `Vary` header value when `IMGPROXY_AUTO_JXL` or `IMGPROXY_ENFORCE_JXL` configs are set to `true`.
 - (pro) Fix generating thumbnails for VP9 videos with high bit depth.
 - (pro) Fix `IMGPROXY_CUSTOM_RESPONSE_HEADERS` and `IMGPROXY_RESPONSE_HEADERS_PASSTHROUGH` configs behavior when the `raw` processing option is used.
 

+ 6 - 1
processing_handler.go

@@ -48,7 +48,12 @@ func initProcessingHandler() {
 
 	vary := make([]string, 0)
 
-	if config.AutoWebp || config.EnforceWebp || config.AutoAvif || config.EnforceAvif {
+	if config.AutoWebp ||
+		config.EnforceWebp ||
+		config.AutoAvif ||
+		config.EnforceAvif ||
+		config.AutoJxl ||
+		config.EnforceJxl {
 		vary = append(vary, "Accept")
 	}