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

[ic] Detect SSL or Non-SSL



> 
> 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!
> 
You could make use of a UserTag like this:

    UserTag is_secure Routine <<EOF
    sub {
        $CGI::secure =~ /^(on|1)$/i ? 1 : 0;
    }
    EOF

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/



Search for: Sort by: