Class: PxModule::Configuration
- Inherits:
-
Object
- Object
- PxModule::Configuration
- Defined in:
- lib/perimeterx/configuration.rb
Constant Summary collapse
- PX_DEFAULT =
{ :app_id => nil, :cookie_key => nil, :auth_token => nil, :module_enabled => true, :captcha_enabled => true, :challenge_enabled => true, :encryption_enabled => true, :blocking_score => 70, :sensitive_headers => ["http-cookie", "http-cookies"], :api_connect_timeout => 0, :api_timeout => 0, :max_buffer_len => 30, :send_page_activities => false, :send_block_activities => true, :sdk_name => PxModule::SDK_NAME, :debug => false, :module_mode => PxModule::ACTIVE_MODE, :local_proxy => false }
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#PX_DEFAULT ⇒ Object
Returns the value of attribute PX_DEFAULT.
Instance Method Summary collapse
-
#initialize(params) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(params) ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 34 35 |
# File 'lib/perimeterx/configuration.rb', line 31 def initialize(params) PX_DEFAULT[:perimeterx_server_host] = "https://sapi-#{params[:app_id].downcase}.perimeterx.net" @configuration = PX_DEFAULT.merge(params); @configuration[:logger] = PxLogger.new(@configuration[:debug]) end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/perimeterx/configuration.rb', line 7 def configuration @configuration end |
#PX_DEFAULT ⇒ Object
Returns the value of attribute PX_DEFAULT.
8 9 10 |
# File 'lib/perimeterx/configuration.rb', line 8 def PX_DEFAULT @PX_DEFAULT end |