From 469046943300fb708a79959de9b3755aeece9c6e Mon Sep 17 00:00:00 2001 From: Daniel Bowling Date: Fri, 2 Aug 2024 20:59:09 -0400 Subject: [PATCH] Let's see if this works cuz there's no tests (??) --- wethepeople.pl | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/wethepeople.pl b/wethepeople.pl index e735d87..ae06640 100755 --- a/wethepeople.pl +++ b/wethepeople.pl @@ -2,21 +2,10 @@ use Mojolicious::Lite; -get '/' => sub { - my ($c) = @_; - my $hostHeader = $c->req->headers->host(); - my $scheme = $c->req->url->base->scheme(); +get '/*' => sub { + my ($c) = @_; - if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) { - $c->render() - } - else { - $c->redirect_to("$scheme://www.wethepeople.win") - } - - # Opt out of Google FLoC - # https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network - $c->res->headers->header('Permissions-Policy', 'interest-cohort=()'); + $c->render(); } => 'index'; app->start();