lib/rack/oauth2/server.rb in rack-oauth2-server-2.2.1 vs lib/rack/oauth2/server.rb in rack-oauth2-server-2.2.2
- old
+ new
@@ -162,9 +162,11 @@
# @see Options
attr_reader :options
def call(env)
+ fail "You set Server.database to #{Server.database.class}, should be a Mongo::DB object" unless Mongo::DB === Server.database
+
request = OAuthRequest.new(env)
return @app.call(env) if options.host && options.host != request.host
return @app.call(env) if options.path && request.path.index(options.path) != 0
begin