diff --git a/Gemfile.lock b/Gemfile.lock index 276ce90fd..abb140545 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - koi (2.6.7) + koi (2.6.8) acts-as-taggable-on (>= 7.0.0) awesome_nested_set (>= 3.3.0) cocoon (>= 1.2.15) diff --git a/lib/koi/middleware/url_redirect.rb b/lib/koi/middleware/url_redirect.rb index 4f4c0718d..092fec5c1 100644 --- a/lib/koi/middleware/url_redirect.rb +++ b/lib/koi/middleware/url_redirect.rb @@ -9,7 +9,7 @@ def initialize(app) def call(env) status, headers, body = @app.call(env) - current_path = env["REQUEST_PATH"] + current_path = "#{env["SCRIPT_NAME"]}#{env["PATH_INFO"]}" if status.to_i == 404 && current_path.exclude?("mini-profiler-resources") && new_path = find_redirect(current_path) request = ActionDispatch::Request.new(env) diff --git a/lib/koi/version.rb b/lib/koi/version.rb index 44ef999a5..27483c30c 100644 --- a/lib/koi/version.rb +++ b/lib/koi/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Koi - VERSION = "2.6.7" + VERSION = "2.6.8" end