Skip to content

Instantly share code, notes, and snippets.

@luszczynski
Created October 25, 2018 16:42
Show Gist options
  • Save luszczynski/c45afe8708485623d09ae15b21c1f230 to your computer and use it in GitHub Desktop.
Save luszczynski/c45afe8708485623d09ae15b21c1f230 to your computer and use it in GitHub Desktop.
iRule f5 openshift
www.cliente.com.br/app1
www.cliente.com.br/app2
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/app-a") } {
HTTP::header replace Host "app-a.apps.no.openshift.com.br"
set uri [string map -nocase {"/app-a/" "/"} [HTTP::uri]]
HTTP::uri $uri
pool openshift_infra_nodes
}
}
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/app-b") } {
HTTP::header replace Host "app-b.apps.no.openshift.com.br"
set uri [string map -nocase {"/app-b/" "/"} [HTTP::uri]]
HTTP::uri $uri
pool openshift_infra_nodes
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment