From 34be40d9284036701a38516cc78ed83300a5bd52 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 27 Feb 2023 12:27:38 +0000 Subject: [PATCH] Fix use of `$ip` --- lib/Lutim/Controller/Image.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lutim/Controller/Image.pm b/lib/Lutim/Controller/Image.pm index 308a7a6..d56ba4c 100644 --- a/lib/Lutim/Controller/Image.pm +++ b/lib/Lutim/Controller/Image.pm @@ -291,7 +291,7 @@ sub add { $unauthorized_api = (!defined($c->req->headers->referrer) || Mojo::URL->new($c->req->headers->referrer)->host ne Mojo::URL->new('https://'.$c->req->headers->host)->host); if ($unauthorized_api) { my $msg = $c->l('Sorry, the API is disabled'); - $c->app->log->info('Blocked API call for '.$ip); + $c->app->log->info('Blocked API call for '.$c->ip(1)); return $c->respond_to( json => { json => { success => Mojo::JSON->false, msg => $msg } }, any => sub {