From cd0c4fea4eedbb5fa948329d29cf8d8888649aba Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 28 Oct 2018 21:52:21 +0100 Subject: [PATCH] Fix warning in change lang endpoint --- lib/Lufi/Controller/Misc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lufi/Controller/Misc.pm b/lib/Lufi/Controller/Misc.pm index f891d9e..0c196c2 100644 --- a/lib/Lufi/Controller/Misc.pm +++ b/lib/Lufi/Controller/Misc.pm @@ -23,7 +23,7 @@ sub change_lang { } if ($c->req->headers->referrer - && Mojo::URL->new($c->req->headers->referrer)->host eq $c->req->url->host) { + && Mojo::URL->new($c->req->headers->referrer)->host eq $c->req->url->to_abs->host) { return $c->redirect_to($c->req->headers->referrer); } else { return $c->redirect_to('/');