Sha256: b612af22000ea93b0a3aba69d7587fc6a4c755a76cd558d8116aaa714e1b2e2c
Contents?: true
Size: 748 Bytes
Versions: 14
Compression:
Stored size: 748 Bytes
Contents
require 'active_support/configurable' module Gris class Application include ActiveSupport::Configurable config_accessor :use_health_middleware config_accessor :use_error_handlers_middleware def self.instance(config = {}) @instance ||= Rack::Builder.new do use Gris::Middleware::Health unless config[:use_health_middleware] == false use Gris::Middleware::ErrorHandlers unless config[:use_error_handlers_middleware] == false use Rack::Cors do allow do origins '*' resource '*', headers: :any, methods: :get end end run Gris::Application.new end.to_app end def call(env) ApplicationEndpoint.call(env) end end end
Version data entries
14 entries across 14 versions & 1 rubygems