Jul 16, 2016
0
Level 3
Serving gziped files on Heroku
I'm trying to add compression for js/css/images on my Laravel app that I'm hosting with Heroku
I've googled this for about half an hour now and I've found two things:
- Heroku does not proxy with nginx servers (https://devcenter.heroku.com/articles/http-routing#gzipped-responses) so I don't think changing my nginx.conf file is any help here (a la https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge)
- There is a ruby gem for rails apps hosted on heroku that seems to solve this problem for rails devs. (https://github.com/romanbsd/heroku-deflater)
Is there a similar package for Laravel projects hosted on heroku to enable compression? Or is it possible to pre-compress the files and serve the compressed versions to the broswer?
Thanks!
Please or to participate in this conversation.