From: Marius Gavrilescu Date: Fri, 4 Dec 2015 12:08:44 +0000 (+0000) Subject: Set Referer header to bypass hotlinking protection X-Git-Tag: 1.000001~3 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=47d5b68652caa0c2413f46048642cc91cc364342;p=www-offliberty.git Set Referer header to bypass hotlinking protection --- diff --git a/lib/WWW/Offliberty.pm b/lib/WWW/Offliberty.pm index 7b658f0..b5b7918 100644 --- a/lib/WWW/Offliberty.pm +++ b/lib/WWW/Offliberty.pm @@ -12,7 +12,7 @@ use constant OFF_URL => 'http://offliberty.com/off54.php'; use HTML::TreeBuilder; use HTTP::Tiny; -my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION "); +my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ", default_headers => {Referer => "http://offliberty.com/"}); sub off{ my ($url, @params) = @_;