forked from lix-project/hydra
Fix login if Hydra runs behind HTTP proxy with sub-path location
This commit is contained in:
parent
d8a5892795
commit
150213cbb3
|
@ -76,8 +76,8 @@ sub begin :Private {
|
|||
|
||||
# XSRF protection: require POST requests to have the same origin.
|
||||
if ($c->req->method eq "POST" && $c->req->path ne "api/push-github") {
|
||||
my $referer = $c->req->header('Origin');
|
||||
$referer //= $c->req->header('Referer');
|
||||
my $referer = $c->req->header('Referer');
|
||||
$referer //= $c->req->header('Origin');
|
||||
my $base = $c->req->base;
|
||||
die unless $base =~ /\/$/;
|
||||
$referer .= "/";
|
||||
|
|
Loading…
Reference in a new issue