mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Pass in the request as an optional second parameter to redirect
This commit is contained in:
@@ -243,7 +243,7 @@ module ActionDispatch
|
||||
|
||||
lambda do |env|
|
||||
req = Request.new(env)
|
||||
uri = URI.parse(path_proc.call(req.symbolized_path_parameters))
|
||||
uri = URI.parse(path_proc.call(req.symbolized_path_parameters, req))
|
||||
uri.scheme ||= req.scheme
|
||||
uri.host ||= req.host
|
||||
uri.port ||= req.port unless req.port == 80
|
||||
|
||||
Reference in New Issue
Block a user