Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rails] Enable config.api_only #9499

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions frameworks/Ruby/rails/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading