wethepeople.win/wethepeople.pl

18 lines
324 B
Perl
Raw Normal View History

2021-01-21 00:15:31 -05:00
#!/usr/bin/env perl
use Mojolicious::Lite;
get '/' => sub {
2021-01-22 20:03:15 -05:00
my ($c) = @_;
my $hostHeader = $c->req->headers->host();
2021-01-21 00:15:31 -05:00
2021-01-22 20:03:15 -05:00
if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) {
$c->render()
}
else {
$c->redirect_to('http://www.wethepeople.win')
}
2021-01-21 00:15:31 -05:00
} => 'index';
app->start();