From 40000925018c5f34068d198d3f661db3a12f1a68 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Fri, 12 May 2023 18:37:39 +0200 Subject: [PATCH] Hidding redirect for bots. --- lib/BurguillosInfo/Controller/Page.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/BurguillosInfo/Controller/Page.pm b/lib/BurguillosInfo/Controller/Page.pm index f3584cf..c03cf76 100644 --- a/lib/BurguillosInfo/Controller/Page.pm +++ b/lib/BurguillosInfo/Controller/Page.pm @@ -28,6 +28,9 @@ sub index { } sub rickroll($self) { + if ($self->req->headers->user_agent =~ /bot/i) { + return $self->render(text => ''); + } $self->res->headers->location('https://www.youtube.com/watch?v=dQw4w9WgXcQ'); $self->render(text => '', status => 302); }