Forum Discussion
LillyM_9417
Altostratus
Apr 27, 2011avoid changing source port of the connection while using SNAT
Hello,
We are using SNAT in the irule. Lets assume client's Ip address 192.1.1.1 and port 9999, after the SNAT operations
we manage to change the clients IP address to spesific ip add...
Does the application actually include the :80 port number in the Location header value? If so, you'd need to use an iRule, I think:
when HTTP_RESPONSE {
Check if server response is a redirect
if { [HTTP::header is_redirect]} {
Log original and updated values
log local0. "Original Location header value: [HTTP::header value Location],\
updated: [string map -nocase "http:// https:// :80/ /" [HTTP::header value Location]]"
Do the update, replacing http:// with https:// and :80/ with /
HTTP::header replace Location \
[string map -nocase "http:// https:// :80/ /" [HTTP::header value Location]]
}
}
If it doesn't include the port, you could use a custom HTTP profile with rewrite redirects enabled.
Aaron
- Leslie_HubertusAug 11, 2023Ret. Employee
JRahm may be able to help with a syntax question when he gets back from his PTO, if nobody else has answered first.
thanks, Leslie_Hubertus appreciate your reply