shukitchan commented on issue #7459:
URL: https://github.com/apache/trafficserver/issues/7459#issuecomment-770188042


   A bit tedious but i will do the following
   
   - normalize the Accept headers in the read_request hook. Similar to
   how Accept-Encoding can be normalized through
   proxy.config.http.normalize_ae . You can also normalize it and keep
   the results in a separate header (,e,g Normalized-Accept). This can be
   done using either header_rewrite or lua plugin
   - you can also use lua/header_rewrite plugin to add the Vary:
   Normalized-Accept for you in the read_response hook.
   
   Kit
   
   On Fri, Jan 29, 2021 at 4:14 AM esmq2092 <[email protected]> wrote:
   >
   > As we known,origin servers will not send any Vary header when response to 
ordinary requests for images.
   >
   > and I found that when ats had image files cached in original encoding ( 
such as jpeg or png ),it will return cached object directly without doing webp 
transform, even client support webp.
   >
   > the following two methods can enforce webp transform,but either are not 
perfect.
   >
   > change proxy.config.http.cache.ignore_accept_mismatch from 2 to 1 ( not 
safe )
   > enforce origin server return Vary: Accept headers for images files ( cause 
cache miss )
   >
   > i wonder is there any way to do it better。。。
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to