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