Closed ndvbd closed 6 years ago
I tried to mount it likes this (routes.rb)
mount HtmlCompressor::Rack.new(Rails.application) => "/test"
But it doesn't work. Do you think it's possible?
Guess, I'm gonna need this too. Was there any movement on this? Or if I can dig in, where to look.
Any progress here?
Okay, I did it myself - see the pull request. Works great! @marvindanig -> you can take it from there
:+1: will give it a look in a bit.
Looks good, thanks @nadavb!
I hope @paolochiodi will merge this pull request (and other two) into the master soon.
Old issue
At the moment the rack middleware is compressing all the responses with a Content Type header that matches "html".
Unfortunately I don't plan to work on htmlcompressor on the next days (maybe weeks too), so you may want to build your own middleware. For guidance see the code for the included middleware (is quite simple): https://github.com/paolochiodi/htmlcompressor/blob/master/lib/htmlcompressor/rack.rb