You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to set a timeout value in a controller?
I dont want to use the gem in all my requests, I want to use only if I send a params in the request...
Something like:
class ApplicationController < ActionController::Base
before_action :config_rack_timeout
def config_rack_timeout
if params[:use_timeout]
Rails.application.config.middleware.insert_before Rack::Runtime, Rack::Timeout, service_timeout: 30
end
end
end
When I try to do this, I get the error: 'can't modify frozen Array'
The text was updated successfully, but these errors were encountered:
Is there a way to set a timeout value in a controller?
I dont want to use the gem in all my requests, I want to use only if I send a params in the request...
Something like:
When I try to do this, I get the error: 'can't modify frozen Array'
The text was updated successfully, but these errors were encountered: