Sha256: 8a0c32b2395eb101d53de9b20ffad27b3c29a75379ecd6f7e1d20ad3829a1ebb
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
module Shogun module Server def serve @rack.use(Rack::Lineprof) if ENV["RACK_ENV"] == "development" @rack.use(Rack::Log, @logger) @rack.use(Rack::Runtime) @rack.use(ActiveRecord::ConnectionAdapters::ConnectionManagement) @rack.use(ActiveRecord::QueryCache) @rack.use(Rack::Chunker) @rack.use(Rack::AcceptSetter, accept_types) @rack.use(Rack::ContentLengthSetter) @rack.use(Rack::AuthenticationBearer, &bearer) @rack.use(Rack::BodyDeserializer, deserialization_map) @rack.use(Rack::BodySerializer, serialization_map, default_serializer) @rack.use(Rack::Protection::RemoteReferrer) @rack.use(Rack::Protection::HttpOrigin) @rack.use(Rack::Protection::EscapedParams) @rack.use(Rack::Protection::XSSHeader) @rack.use(Rack::Protection::FrameOptions) @rack.use(Rack::Protection::PathTraversal) @rack.use(Rack::Protection::IPSpoofing) @rack.run(Shogun::Dispatch.new(logger: @logger, &endpoints)) end private def endpoints self.class.const_get("ENDPOINTS") end private def deserialization_map self.class.const_get("DESERIALIZATION_MAP") end private def bearer self.class.const_get("BEARER") end private def serialization_map self.class.const_get("SERIALIZATION_MAP") end private def default_serializer self.class.const_get("DEFAULT_SERIALIZER") end private def accept_types self.class.const_get("ACCEPT_TYPES") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shogun-1.0.0 | lib/shogun/server.rb |