mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: support query params when redirecting to internal link on login (#7829)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user