Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
  • Loading branch information
mfiedorowicz committed Dec 30, 2024
1 parent ab5dfb6 commit 7d8209a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox_diode_plugin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def redirect_to_login(request):
redirect_url = netbox_settings.LOGIN_URL
target = request.path

if target and url_has_allowed_host_and_scheme(request.path, allowed_hosts=None):
if target and url_has_allowed_host_and_scheme(target, allowed_hosts=None):
redirect_url = f"{netbox_settings.LOGIN_URL}?next={target}"

return HttpResponseRedirect(redirect_url)
Expand Down

0 comments on commit 7d8209a

Please sign in to comment.