Forum Discussion
Lukasz_01_15307
Sep 13, 2016Nimbostratus
irule executes twice when refreshing a website
Hello.. I have a really odd problem, my irule script works exactly every second time. I'm working with APIs and on the backend, they are setup to use apiName.example.com/api/id. For the real world, W...
- Sep 13, 2016
Try unsetting your variables at the end of the iRule? Specifically...
unset $newSubdomain
ekaleido
Cirrus
Try unsetting your variables at the end of the iRule? Specifically...
unset $newSubdomain
ekaleido
Sep 13, 2016Cirrus
Using the following modifications? What is being logged?
when HTTP_REQUEST {
log local0. "-------------------------------------------------------------"
log local0. "Path [HTTP::path]"
if { not ([HTTP::path] starts_with "/api/") } { return }
set apiType [lindex [split [HTTP::path] "/"] 2]
log local0. "api type $apiType"
append newSubdomain $apiType .uat.
log local0. "New Subdomain $newSubdomain"
HTTP::header replace "Host" [string map [list "api-uat." $newSubdomain ] [HTTP::host]]
log local0. "-------True"
HTTP::path [string map [list "/api/$apiType" "/api"] [HTTP::path]]
log local0. "New Path [HTTP::host][HTTP::path]"
unset $newSubdomain
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects