wethepeople.win/wethepeople.pl
Daniel Bowling b87c39c90d Revert "Fix syntax"
This reverts commit cb72411379.
2021-01-25 20:02:35 -05:00

19 lines
378 B
Perl
Executable File

#!/usr/bin/env perl
use Mojolicious::Lite;
get '/' => sub {
my ($c) = @_;
my $hostHeader = $c->req->headers->host();
my $scheme = $c->req->url->base->scheme();
if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) {
$c->render()
}
else {
$c->redirect_to("$scheme://www.wethepeople.win")
}
} => 'index';
app->start();