Do not prepend default host to absolute URLs
Issue: https://rt.cpan.org/Ticket/Display.html?id=119790
This commit is contained in:
parent
c70df145f0
commit
3cb20d8f8c
@ -102,8 +102,8 @@ The config flags are:
|
||||
|
||||
=item host
|
||||
|
||||
A default host that will be prepended to all requests. Allows you to just
|
||||
specify the path when making requests.
|
||||
A default host that will be prepended to all requests using relative URLs.
|
||||
Allows you to just specify the path when making requests.
|
||||
|
||||
The default is undef - you must include the host in your requests.
|
||||
|
||||
@ -476,6 +476,9 @@ sub _prepareURL {
|
||||
my $self = shift;
|
||||
my $url = shift;
|
||||
|
||||
# Do not prepend default host to absolute URLs.
|
||||
return $url if $url =~ /^https?:/;
|
||||
|
||||
my $host = $self->getHost;
|
||||
if($host){
|
||||
$url = '/'.$url unless $url =~ /^\//;
|
||||
|
Loading…
x
Reference in New Issue
Block a user