ruby - Rails App hosted in heroku, with Cloudfront, giving net::ERR_INVALID_CHUNKED_ENCODING -
when try serve gzipped assets, i'm getting net::err_invalid_chunked_encoding randomly in assets. i'm using rack zippy gem, i've tried use rack deflate , gives same error. cloudfront pointing heroku. more info , relevant source codes:
$ rake middleware
use honeybadger::rack::userinformer use honeybadger::rack::userfeedback use honeybadger::rack::errornotifier use rack::sendfile use rack::zippy::assetserver use rack::lock use #<activesupport::cache::strategy::localcache::middleware:0x00000008358600> (...)
config.ru
# file used rack-based servers start application. require ::file.expand_path('../config/environment', __file__) use rack::chunked use rack::deflater run soprojetos::application
initializer rack_zippy.ru
rails.application.config.middleware.swap(actiondispatch::static, rack::zippy::assetserver) rack::zippy.configure |config| config.static_extensions << 'xml' end
enviroments/production.rb
(...) config.assets.compress = true # disable rails's static asset server (apache or nginx this). config.serve_static_assets = true # compress javascripts , css. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # not fallback assets pipeline if precompiled asset missed. config.assets.compile = false # generate digests assets urls. config.assets.digest = true (...) config.middleware.use rack::attack config.middleware.insert_before actiondispatch::static, rack::ssl, :exclude => proc { |env| env['https'] != 'on' } (...)
Comments
Post a Comment