File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # -*- coding: utf-8 -*-
2- #
31# Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
2+ # Copyright (C) 2024 Sutou Kouhei <kou@clear-code.com>
43#
54# This library is free software; you can redistribute it and/or
65# modify it under the terms of the GNU Lesser General Public
@@ -32,7 +31,7 @@ def initialize(query_parameter, api_keys)
3231 # @return [Boolean] true if an API key is included, or false if not.
3332 def include? ( environment )
3433 request = Rack ::Request . new ( environment )
35- key = request [ @query_parameter ]
34+ key = request . params [ @query_parameter ]
3635
3736 @api_keys . include? ( key )
3837 end
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def initialize(application)
8282 # For Rack.
8383 def call ( environment )
8484 request = Rack ::Request . new ( environment )
85- callback = request [ "callback" ]
85+ callback = request . params [ "callback" ]
8686 update_cache_key ( request ) if callback
8787 status , headers , body = @application . call ( environment )
8888 return [ status , headers , body ] unless callback
You can’t perform that action at this time.
0 commit comments