Hi,
I'd like to stop my browser complaining about insecure elements (http:// image links), when I open DBMan via https://.
In template globals, I put "protocol" with the following sub:
sub {
my $tags = shift;
my $port = ($ENV{'SERVER_PORT'});
if ($port eq 80) { return "http"; }
if ($port eq 443) { return "https"; }
return $port;
}
In my header template, I put:
<%if protocol eq http%>
<img src="http://www.yourdomain.com/images/someimage.jpg">
<%endif%>
<%if protocol eq https%>
<img src="https://www.yourdomain.com/images/someimage.jpg">
<%endif%>
Cheers,
Oliver
I'd like to stop my browser complaining about insecure elements (http:// image links), when I open DBMan via https://.
In template globals, I put "protocol" with the following sub:
sub {
my $tags = shift;
my $port = ($ENV{'SERVER_PORT'});
if ($port eq 80) { return "http"; }
if ($port eq 443) { return "https"; }
return $port;
}
In my header template, I put:
<%if protocol eq http%>
<img src="http://www.yourdomain.com/images/someimage.jpg">
<%endif%>
<%if protocol eq https%>
<img src="https://www.yourdomain.com/images/someimage.jpg">
<%endif%>
Cheers,
Oliver