lib/api_proxy/config.rb in api_proxy-0.1.1 vs lib/api_proxy/config.rb in api_proxy-0.1.2

- old
+ new

@@ -1,10 +1,18 @@ # frozen_string_literal: true module ApiProxy class Config - attr_accessor :api_key, :api_secret, :url_scheme, :api_host, :api_port, :api_prefix, :request_starts_with + attr_accessor :api_key, + :api_secret, + :url_scheme, + :api_host, + :api_port, + :api_prefix, + :request_starts_with, + :request_allowed, + :custom_headers def initialize load_defaults end @@ -16,8 +24,11 @@ @api_host = 'localhost' @api_port = 3000 @api_prefix = '/api/v1/' @request_starts_with = '/_ts' + + @request_allowed = ->(_env) { true } + @custom_headers = ->(_env) { {} } end end end