Forum Discussion
SSL Forward proxy and 302 Redirects?
The below iRule is part of an SSL Intercept solution to sent traffic to Bluecoat Proxies after being decrypted, but certain sites send a 302 redirect with an https location header and i think this results in a redirection loop, does anyone have any experience with this kind scenario while deploying an SSL Forward proxy and what would be the fix, i tried capture the response and remove the location header and inserting an http one, but that did not work out..
when HTTP_REQUEST {
if { $static::DEBUG } { log local0. "in event" }
Check proxy service availability. If down, VIP target around it to egress
if { [active_members $static::PROXY_SERVICE_POOL] == 0 } {
Proxy service is down - VIP target around it to egress
log local0. "ALERT: Proxy service is down - skipping to egress"
virtual $static::EGRESS_TCP_VIP
} else {
if { $static::DEBUG } { log local0. "sending to proxy service" }
Get the hostname from the X-Proxy-HTTPS header or the Host header
if { [HTTP::header exists X-Proxy-HTTPS] } {
use the SNI value
set host [lindex [split [HTTP::header X-Proxy-HTTPS] ":"] 1]
set port 80
} else {
use the Host header
if { [HTTP::host] contains ":" } {
set host [lindex [split [HTTP::host] ":"] 0]
set port [lindex [split [HTTP::host] ":"] 1]
} else {
set host [HTTP::host]
set port 80
}
}
Send modified PROXY request
HTTP::uri "http://${host}:${port}[HTTP::uri]"
HTTP::header insert Proxy-Connection "Keep-Alive"
Direct to the downstream proxy (and optionally enable SNAT)
snat automap
pool $static::PROXY_SERVICE_POOL
}
}
- Anesh
Cirrostratus
The above iRule is part of an SSL Forward proxy implementaion. After the site[https://www.365online.com ] is decrypted, it is sent to a Bluecoat proxySG via the above iRule...
The Irule works for most https sites, but for the site https://www.365online.com When a GET request is sent via the above iRule it responds with a 302 and location header as https://www.365online.com which causes the connection to break
- Samir_Jha_52506
Noctilucent
Instate of
HTTP::uri "http://${host}:${port}[HTTP::uri]"
Try below line.
HTTP::respond 302 Location "http://${host}:${port}[HTTP::uri]"
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