Skip to content

Commit

Permalink
Rails 7.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sfnelson committed Sep 20, 2023
1 parent 2cb3f2b commit 473adc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
katalyst-koi (4.1.0)
katalyst-koi (4.1.1)
bcrypt
importmap-rails
katalyst-content
Expand Down
5 changes: 2 additions & 3 deletions lib/koi/middleware/url_redirect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/koi/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Koi
VERSION = "4.1.0"
VERSION = "4.1.1"
end

0 comments on commit 473adc9

Please sign in to comment.