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
|
@ -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