Don't redirect to /serviceworker.js on sign in. (#12479)
This commit is contained in:
parent
2f51f47dd1
commit
2f030d8ba9
1 changed files with 2 additions and 1 deletions
|
|
@ -5,7 +5,8 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
if user_signed_in?
|
||||
redirect_to root_path(signin: "true")
|
||||
else
|
||||
if URI(request.referer || "").host == URI(request.base_url).host
|
||||
referer_path = URI(request.referer || "").path
|
||||
if URI(request.referer || "").host == URI(request.base_url).host && referer_path != "/serviceworker.js"
|
||||
store_location_for(:user, request.referer)
|
||||
end
|
||||
super
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue