5
0
mirror of git://git.proxmox.com/git/pve-http-server.git synced 2025-08-01 12:21:56 +03:00

store Host header in rpc environment

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-04-02 12:22:02 +02:00
committed by Thomas Lamprecht
parent ea574439f7
commit 8782148642

View File

@ -1194,11 +1194,15 @@ sub unshift_read_header {
my $len = $r->header('Content-Length');
my $host_header = $r->header('Host');
my $rpcenv = $self->{rpcenv};
$rpcenv->set_request_host($host_header);
# header processing complete - authenticate now
my $auth = {};
if ($self->{spiceproxy}) {
my $connect_str = $r->header('Host');
my $connect_str = $host_header;
my ($vmid, $node, $port) = $self->verify_spice_connect_url($connect_str);
if (!(defined($vmid) && $node && $port)) {
$self->error($reqstate, HTTP_UNAUTHORIZED, "invalid ticket");