Gossamer Forum
Home : Products : DBMan SQL : Discussion :

https and images

Quote Reply
https and images

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">

<%if protocol eq https%>
<img src="https://www.yourdomain.com/images/someimage.jpg">

Subject Author Views Date
Thread https and images olivers 3005 Jul 28, 2003, 1:56 AM
Post Re: [olivers] https and images
olivers 2523 Jul 28, 2005, 9:49 AM