FEATURE: support query params when redirecting to internal link on login (#7829)

This commit is contained in:
Arpit Jalan
2019-07-04 11:11:43 +05:30
committed by GitHub
parent 32edaa3843
commit 1708be4f27
2 changed files with 8 additions and 2 deletions

View File

@@ -101,8 +101,7 @@ class StaticController < ApplicationController
(uri.host.blank? || uri.host == forum_uri.host) &&
uri.path !~ /\./
destination = uri.path
destination = "#{uri.path}?#{uri.query}" if uri.path =~ /new-topic/ || uri.path =~ /new-message/ || uri.path =~ /user-api-key/
destination = "#{uri.path}#{uri.query ? "?#{uri.query}" : ""}"
end
rescue URI::Error
# Do nothing if the URI is invalid