diff --git a/frameworks/Ruby/rails/config/application.rb b/frameworks/Ruby/rails/config/application.rb index 291c4f983ae..d6be2b4b4e4 100644 --- a/frameworks/Ruby/rails/config/application.rb +++ b/frameworks/Ruby/rails/config/application.rb @@ -30,26 +30,19 @@ class Application < Rails::Application config.action_dispatch.default_headers.merge!('Server' => 'WebServer') + config.api_only = true + config.middleware.delete ActionDispatch::Callbacks - config.middleware.delete ActionDispatch::ContentSecurityPolicy::Middleware - config.middleware.delete ActionDispatch::Cookies config.middleware.delete ActionDispatch::DebugExceptions config.middleware.delete ActionDispatch::Executor - config.middleware.delete ActionDispatch::Flash - config.middleware.delete ActionDispatch::PermissionsPolicy::Middleware - config.middleware.delete ActionDispatch::Reloader config.middleware.delete ActionDispatch::RemoteIp config.middleware.delete ActionDispatch::RequestId - config.middleware.delete ActionDispatch::Session::CookieStore config.middleware.delete ActionDispatch::ShowExceptions - config.middleware.delete ActiveRecord::Migration::CheckPending config.middleware.delete Rack::ConditionalGet config.middleware.delete Rack::ETag config.middleware.delete Rack::Head - config.middleware.delete Rack::MethodOverride config.middleware.delete Rack::Runtime config.middleware.delete Rack::Sendfile - config.middleware.delete Rack::TempfileReaper config.middleware.delete Rails::Rack::Logger config.active_support.isolation_level = :fiber if defined?(Falcon)