unjs / ipx

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

Don't overwrite existing Vary header #174

Closed aaharu closed 11 months ago

aaharu commented 1 year ago

Describe the feature

Vary header has be set by setResponseHeader function. However, it's means that if the Vary header is already set, its values are gone. https://github.com/unjs/ipx/blob/v2.0.0-0/src/server.ts#L68

I think appendResponseHeader is more appropriate.

Additional information

pi0 commented 11 months ago

https://github.com/unjs/ipx/commit/fb3cf1d0e1d2bc9cedf94f0a2e2896d6388ea675 (and https://github.com/unjs/ipx/commit/ce0cf0e7dd8c2427a4cc6336eea78e339ffd7829)