lib/mkit/app/mkit_server.rb in mkit-0.6.3 vs lib/mkit/app/mkit_server.rb in mkit-0.7.0

- old
+ new

@@ -6,9 +6,11 @@ class Server < Sinatra::Base set :default_content_type, :json set :dump_errors, true set :show_exceptions, false set :raise_errors, false + set :sockets, [] + set :listeners, [] before do api_key = request.env['HTTP_X_API_KEY'] cfg = YAML.load_file(MKIt::Config.config_file) if cfg.nil? || cfg['mkit'].nil? || cfg['mkit']['clients'].nil? || !cfg['mkit']['clients'].map{|h| h['id']}.include?(api_key)