class Sqreen::Rules::RecordRequestContext
Save request context for handling further down
Constants
- WHITELISTED_METRIC
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/sqreen/rules/record_request_context.rb, line 13 def initialize(*args) super(*args) @overtimeable = false end
Public Instance Methods
failing(_exception, _inst, _args, _budget = nil, &_block)
click to toggle source
# File lib/sqreen/rules/record_request_context.rb, line 41 def failing(_exception, _inst, _args, _budget = nil, &_block) framework.clean_request advise_action(nil) end
post(rv, _inst, args, _budget = nil, &_block)
click to toggle source
# File lib/sqreen/rules/record_request_context.rb, line 35 def post(rv, _inst, args, _budget = nil, &_block) framework.store_response(rv, args[0]) framework.clean_request advise_action(nil) end
pre(_inst, args, _budget = nil, &_block)
click to toggle source
# File lib/sqreen/rules/record_request_context.rb, line 22 def pre(_inst, args, _budget = nil, &_block) framework.store_request(args[0]) wh = framework.whitelisted_match if wh unless Sqreen.features.key?('whitelisted_metric') && !Sqreen.features['whitelisted_metric'] record_observation(WHITELISTED_METRIC, wh, 1) end Sqreen.log.debug { "Request was whitelisted because of #{wh}" } end advise_action(nil) end
whitelisted?()
click to toggle source
# File lib/sqreen/rules/record_request_context.rb, line 18 def whitelisted? false end