diff options
| author | 2016-05-05 14:54:32 -0700 | |
|---|---|---|
| committer | 2016-05-05 14:54:32 -0700 | |
| commit | 141fc30c89eb8f5a7e638c0a8555f05bb8981bfb (patch) | |
| tree | b60885048862e9d7f741ea8e0f8e6055b2e07751 /lib/ASM | |
| parent | 87fb29a330bac19bb546f0910f4ea646b9fe9a23 (diff) | |
Use YOURLS shortening service rather than shortener.godaddy.com
Diffstat (limited to 'lib/ASM')
| -rw-r--r-- | lib/ASM/Shortener.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ASM/Shortener.pm b/lib/ASM/Shortener.pm index cd3f32a..8ec7d42 100644 --- a/lib/ASM/Shortener.pm +++ b/lib/ASM/Shortener.pm @@ -18,9 +18,11 @@ sub shorturl } my $apikey = $::settings->{web}->{shortener}->{apikey}; my $domain = $::settings->{web}->{shortener}->{domain}; + my $secure = $::settings->{web}->{shortener}->{secure}; my $ua = LWP::UserAgent->new; $ua->agent("AntiSpamMeta/13.37 "); - my $res = $ua->get('https://shortener.godaddy.com/v1/?apikey=' .$apikey . '&domain=' . $domain .'&url=' . uri_escape($url) ); + my $res = $ua->get('http' . ($secure ? 's' : '') . '://' . $domain . '/yourls-api.php?' . + 'signature=' . $apikey . '&action=shorturl&format=simple&url=' . uri_escape($url) ); if ($res->is_success) { return $res->content; } |
