Clean up excess redirects
This commit is contained in:
parent
a588be82b4
commit
aef71fdbae
@ -5,12 +5,13 @@ use Mojolicious::Lite;
|
|||||||
get '/' => sub {
|
get '/' => sub {
|
||||||
my ($c) = @_;
|
my ($c) = @_;
|
||||||
my $hostHeader = $c->req->headers->host();
|
my $hostHeader = $c->req->headers->host();
|
||||||
|
my $scheme = $c->req->url->base->scheme();
|
||||||
|
|
||||||
if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) {
|
if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) {
|
||||||
$c->render()
|
$c->render()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$c->redirect_to('http://www.wethepeople.win')
|
$c->redirect_to("$scheme://www.wethepeople.win")
|
||||||
}
|
}
|
||||||
} => 'index';
|
} => 'index';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user