Class: MissionControl::Web::RequestFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/mission_control/web/request_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ RequestFilter

Returns a new instance of RequestFilter.



5
6
7
# File 'lib/mission_control/web/request_filter.rb', line 5

def initialize(request)
  @request = request
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



3
4
5
# File 'lib/mission_control/web/request_filter.rb', line 3

def request
  @request
end

Instance Method Details

#actionObject



9
10
11
12
13
14
15
# File 'lib/mission_control/web/request_filter.rb', line 9

def action
  request.fetch_header("mission_control.action") do
    if MissionControl::Web.host_application.route_disabled?(request.path)
      :disallowed
    end
  end
end