forked from lix-project/hydra
Fix referer check
This commit is contained in:
parent
c928c41ee1
commit
5d8fbc6ca1
|
@ -66,7 +66,7 @@ sub begin :Private {
|
|||
$referer //= $c->req->header('Referer');
|
||||
my $base = $c->req->base;
|
||||
error($c, "POST requests should come from ‘$base’")
|
||||
unless defined $referer && $referer eq $base;
|
||||
unless defined $referer && substr($referer, 0, length $base) eq $base;
|
||||
}
|
||||
|
||||
$c->forward('deserialize');
|
||||
|
|
Loading…
Reference in a new issue