diff --git a/Gemfile.lock b/Gemfile.lock index dbc78d056..9436b3aef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - katalyst-koi (4.1.0) + katalyst-koi (4.1.1) bcrypt importmap-rails katalyst-content diff --git a/lib/koi/middleware/url_redirect.rb b/lib/koi/middleware/url_redirect.rb index 2c00a0096..8db51a0c7 100644 --- a/lib/koi/middleware/url_redirect.rb +++ b/lib/koi/middleware/url_redirect.rb @@ -9,10 +9,9 @@ def initialize(app) def call(env) status, headers, body = @app.call(env) - current_path = env["REQUEST_PATH"] + current_path = env["REQUEST_URI"] - if status.to_i == 404 && current_path.exclude?("mini-profiler-resources") && - (new_path = find_redirect(current_path)) + if status.to_i == 404 && (new_path = find_redirect(current_path)) request = ActionDispatch::Request.new(env) # Close the body as we will not use it for a 301 redirect diff --git a/lib/koi/version.rb b/lib/koi/version.rb index abf0e923d..d4d93500b 100644 --- a/lib/koi/version.rb +++ b/lib/koi/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Koi - VERSION = "4.1.0" + VERSION = "4.1.1" end