Sha256: f31e8f4f78509e834ab50e604967d43e8ace35c88425afaa11965841ad200fb3
Contents?: true
Size: 384 Bytes
Versions: 17
Compression:
Stored size: 384 Bytes
Contents
require 'rest-core/middleware' class RestCore::DefaultSite def self.members; [:site]; end include RestCore::Middleware def call env, &k path = if env[REQUEST_PATH].to_s.include?('://') env[REQUEST_PATH] else File.join(site(env).to_s, env[REQUEST_PATH].to_s) end app.call(env.merge(REQUEST_PATH => path), &k) end end
Version data entries
17 entries across 17 versions & 1 rubygems