unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.53k stars 61 forks source link

Etag from request header and generate problem #96

Closed 1412579 closed 1 year ago

1412579 commented 1 year ago

I have problem when working with ipx etag. I read ipx repository and it support etag but it not working as expected. I explored that etag from request header and etag are different when generated

Please check it

image

image

aaharu commented 1 year ago

It seems to be caused by sanetizeReponse. https://github.com/unjs/ipx/blob/main/src/middleware.ts#L129-L148