diff options
author | Yorhel <git@yorhel.nl> | 2014-10-21 09:53:53 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-10-21 09:53:53 +0200 |
commit | 20805809f42d8fa152aca46d0b737e90b308092a (patch) | |
tree | 6ef0b87fc96b26f6f1678501a9cb2e390808b4f8 /lib/VNDB/Util | |
parent | 57022acc845a1502e4e42a322d48567b9afe7f02 (diff) |
Use TUWF's reqBaseURI() instead of $self->{uri} on site links
TUWF properly detects HTTPS and includes this in the returned URL, so
this change ensures that all URLs adopt properly to HTTP and HTTPS.
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/Misc.pm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 07058b4f..fc7ec8ad 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -25,7 +25,7 @@ sub htmlHeader { # %options->{ title, noindex, search, feeds, svg } title $o{title}; Link rel => 'shortcut icon', href => '/favicon.ico', type => 'image/x-icon'; Link rel => 'stylesheet', href => $self->{url_static}.'/s/'.$skin.'/style.css?'.$self->{version}, type => 'text/css', media => 'all'; - Link rel => 'search', type => 'application/opensearchdescription+xml', title => 'VNDB VN Search', href => $self->{url}.'/opensearch.xml'; + Link rel => 'search', type => 'application/opensearchdescription+xml', title => 'VNDB VN Search', href => $self->reqBaseURI().'/opensearch.xml'; if($self->authPref('customcss')) { (my $css = $self->authPref('customcss')) =~ s/\n/ /g; style type => 'text/css', $css; diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm index b7503c24..48bc226d 100644 --- a/lib/VNDB/Util/Misc.pm +++ b/lib/VNDB/Util/Misc.pm @@ -105,7 +105,8 @@ sub ieCheck { $self->reqHeader('User-Agent') !~ /MSIE [67]/ || $self->reqCookie('ie_sucks'); if($self->reqGet('i-still-want-access')) { - (my $ref = $self->reqHeader('Referer') || '/') =~ s/^\Q$self->{url}//; + my $b = $self->reqBaseURI(); + (my $ref = $self->reqHeader('Referer') || '/') =~ s/^\Q$b//; $self->resRedirect($ref, 'temp'); $self->resCookie('ie_sucks' => 1); return; |