Module: RailsConsoleAi::BuiltinGuards::EngineCallBlocker

Defined in:
lib/rails_console_ai/safety_guards.rb

Overview

Backstop for the same hazard via direct Rack dispatch (e.g. Rails.application.call(env)), which bypasses Integration::Session.

Instance Method Summary collapse

Instance Method Details

#call(env, *args) ⇒ Object



382
383
384
385
386
387
# File 'lib/rails_console_ai/safety_guards.rb', line 382

def call(env, *args)
  if env.is_a?(Hash)
    RailsConsoleAi::BuiltinGuards.check_in_process_request!(env['REQUEST_METHOD'], env['PATH_INFO'])
  end
  super
end