magnars / optimus

A Ring middleware for frontend performance optimization.
364 stars 23 forks source link

Content Encoding #62

Closed kendagriff closed 6 years ago

kendagriff commented 6 years ago

Quick question: I have some precompressed (gzipped) javascript assets I'd like to serve via Optimus, however, they need "Content-Encoding: gzip" attached as a response header.

Any suggestion for how to accomplish that?

magnars commented 6 years ago

Optimus assets are just maps, and :headers is one of the fields. You can assoc your headers there. See how long expiry headers are added by Optimus itself. tor. 11. jan. 2018 kl. 19:04 skrev Kendall Buchanan < notifications@github.com>:

Quick question: I have some precompressed (gzipped) javascript assets I'd like to serve via Optimus, however, they need "Content-Encoding: gzip" attached as a response header.

Any suggestion for how to accomplish that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/magnars/optimus/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQOOZ12kbiajuN6PgmUrfMa7ErwPFdrks5tJk09gaJpZM4RbOef .

kendagriff commented 6 years ago

Awesome! Thanks for the tip.