
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
The purpose of Rack::GridServe
is to provide an alternative to
Rack::Gridfs which works with the Mongo
ruby driver version 2.0
and above. This driver has a different API and while the Rack::Gridfs
team is working on it, it is not yet ready.
While Rack::GridServe
can be used the same way, it is by no mean
as complete and well crafted as Rack::Gridfs
. So I recommend that
you switch back when their next version is ready.
Until then, the function is the same, you can mount the middleware
in order to serve images which are hosted in the GridFS
part
of a Mongo
database.
Here is how you mount it in your config.ru
:
require 'rack/grid_serve'
use Rack::GridServe, {
db: $db,
prefix: 'gridfs', # Path prefix, default is "gridfs"
cache_control: 'no-cache' # Default is "no-cache"
}
These are the only options so far.
Rack::GridServe
sets the ETag
and Last-Modified
response
headers and uses Rack::ConditionalGet
to let the browser use
cached version of the files when possible.
Run tests this way:
bundle exec ruby -I lib test.rb
FAQs
Unknown package
We found that rack-grid-serve 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.