Browse files

Save JSONP-callback in env['rack.jsonp.callback'] for access from oth…

…er middleware and/or app.
  • Loading branch information...
1 parent 50e0e69 commit c2001f21b9afe6cf55aa69b8d1263042a22fb725 @grimen committed Feb 23, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rack/jsonp.rb
View
1 lib/rack/jsonp.rb
@@ -28,6 +28,7 @@ def call(env)
env['QUERY_STRING'] = env['QUERY_STRING'].split("&").delete_if{|param|
param =~ /^(_|#{@callback_param})=/
}.join("&")
+ env['rack.jsonp.callback'] = callback
status, headers, response = @app.call(env)

0 comments on commit c2001f2

Please sign in to comment.