Sha256: 91faa82de58fa9f70ab42e17d87589269df8fe40b91408852499f09321fcf40c
Contents?: true
Size: 373 Bytes
Versions: 13
Compression:
Stored size: 373 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.start_with?('http') env[REQUEST_PATH] else "#{site(env)}#{env[REQUEST_PATH]}" end app.call(env.merge(REQUEST_PATH => path), &k) end end
Version data entries
13 entries across 13 versions & 1 rubygems