module Roda::RodaPlugins::Public
def self.configure(app, opts={})
:headers :: A hash of headers to use for statically served files
supporting gzipped transfer encoding.
:gzip :: Whether to serve already gzipped files with a .gz extension for clients
:default_mime :: The default mime type to use if the mime type is not recognized.
Use options given to setup a Rack::File instance for serving files. Options:
def self.configure(app, opts={}) root = app.expand_path(opts[:root]||"public") app.opts[:public_server] = ::Rack::File.new(root, opts[:headers]||{}, opts[:default_mime] || 'text/plain') app.opts[:public_gzip] = opts[:gzip] end