HTTP POST redirect preserving POST data
Published Mar 18, 2015
Version 1.0Was this article helpful?
@victor Plohod, try this irule
when HTTP_REQUEST {
Check if the client used an SSL cipher
if {not ([catch {SSL::cipher version} result]) && [string tolower $result] ne "none"}{
Client did use a cipher
log local0. "\$result: $result. Allowing encrypted request."
} else {
Client did not use a cipher
log local0. "\$result: $result. Redirecting unencrypted request."
if { [HTTP::method] eq "POST" } {
HTTP::respond 307 "https://[HTTP::host]/"
} else {
HTTP::respond 302 "https://[HTTP::host]/"
}
}
}