Interchange Developer Resource
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

[ic] Detect SSL or Non-SSL



At 07:50 PM 4/24/02, you wrote:
>Using IC tags is there a way to detect if the page has been served in
>SSL or non-ssl mode?  With javascript you can do:
>
>if (document.location.protocol == "http:")
>
>But I would like to avoid using javascript if possible.  Thanks!
>
>-Ron

Ron,

One way to find out is in a usertag:

UserTag is_secure Routine <<EOR
sub {
return $CGI::secure;
}
EOR

(I believe the value will be either "on" or "" )

There maybe other ways, but I had need in a usertag
at one point (back in mv days I think) and found
  $CGI::secure in the source , so used it myself :-)

Kyle Cook



Search for: Sort by: