# class WebConsole::Request

Web Console tailored request object.

### Public Instance Methods

acceptable?() click to toggle source

Returns whether the request is acceptable.

    # File lib/web_console/request.rb, line 25
    def acceptable?
      xhr? && accepts.any? { |mime| Mime[:web_console_v2] == mime }
    end

from_whitelisted_ip?() click to toggle source

Returns whether a request came from a whitelisted IP.

For a request to hit Web Console features, it needs to come from a white listed IP.

    # File lib/web_console/request.rb, line 15
    def from_whitelisted_ip?
      whitelisted_ips.include?(strict_remote_ip)
    end

strict_remote_ip() click to toggle source

Determines the remote IP using our much stricter whitelist.

    # File lib/web_console/request.rb, line 20
    def strict_remote_ip
      GetSecureIp.new(self, whitelisted_ips).to_s
    end