Forum Discussion
determine HTTP or HTTPS
- Sep 24, 2015
Patrik, good one. You have typo. It should be:
if { [PROFILE::exists clientssl] == 1 } { set protocol "https" } else { set protocol "http" }I'm doing this on CLIENT_ACCEPTED. The method with CLIENTSSL_HANDSHAKE will not work because BIG-IP refuse to load it on VS without SSL profile.
Patrik, good one. You have typo. It should be:
if { [PROFILE::exists clientssl] == 1 } {
set protocol "https"
} else {
set protocol "http"
}
I'm doing this on CLIENT_ACCEPTED. The method with CLIENTSSL_HANDSHAKE will not work because BIG-IP refuse to load it on VS without SSL profile.
- Kevin_Davies_40Oct 25, 2016
Nacreous
Given the predilection for TCL that 0 is false and anything else is true you can shorten this to....
if {[PROFILE::exists clientssl]} { set protocol https } else { set protocol http }But you can even get more funky with TCL ? conditions
set protocol [[PROFILE::exists clientssl]?https:http]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com