Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
heroku_rails_deflate
Advanced tools
The Heroku Cedar stack is not fronted by an asset server such as Varnish or nginx, and there is no automatic provision for using gzip compression for HTTP transfers. At the same time, the Rails 3.2 asset pipeline spends a lot of CPU cycles creating highly compressed versions of all our static assets. It would be great to use them!
This gem activates Rack::Deflate for all requests. But the real coolness is the custom middleware that checks for the .gz version of precompiled assets and serves them up for you. We also eliminate conflict with Rack::Deflate by telling it not to compress these already compressed files. We also provide a sensible default for the Cache-Control header for these files. If you are using the asset digest in the filename (and you should), there is no reason why we can't set very high max-age, so we set it to one year by default.
You should see a nice performance boost from the installation of this gem, without any additional work on your part. After you get done with this, you could take it to the next level by adding a CDN such as AWS CloudFront.
gem 'heroku_rails_deflate', :group => :production
config.serve_static_assets = true
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
config.static_cache_control = "public, max-age=31536000"
RAILS_ENV=production rake assets:precompile
This gem uses a combination of techniques from this gist by guyboltonking and romanbsd's gem heroku-deflater.
Copyright (c) 2013 Matt Olson. See LICENSE.txt for further details.
FAQs
Unknown package
We found that heroku_rails_deflate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.