Forum Discussion
Manipulation for login page of Server response
Hello,
Requirement : End user should hit my company's portal"https://abc.com/shop/" & f5 should act as reverse proxy & forward the request to third party portal "https://xyz.com/shop/".
Problem : I could replace the host from request & send to the backend server which has been hosted on internet. Server responds with login page which has username, password text boxes & Login button. When end user clicks on login button it gets redirected to third party portal "https://xyz.com/shop/". While analyzing the source code of webpage it was found that under form tag of html page there is action tag which points it to "https://xyz.com/shop/". I tried stream expression in server response as mentioned below when HTTP_RESPONSE {
STREAM::disable STREAM::expression {@action=}
STREAM::enable log local0. "Stream Expression Replaced" } I could see the"Stream Expression Replaced" in LTM logs however when I click on login button, it goes to https://xyz.com/shop instead of https://abc.com/shop. Even after steam expression applied, I still see action=https://xyz.com/shop in source for server response. Please suggest how do I intercept server response in order to manipulate action under form tab.
Thanks in advance.
5 Replies
- nitass
Employee
did you remove accept-encoding request header?
Since HTTP compression on the server prevents the BIG-IP system from reading the data stream and performing the intended replacement, you may need to configure the HTTP profile to remove the Accept-Encoding header in the request to prevent compression by the server.
sol8115: Overview of the Stream profile
https://support.f5.com/kb/en-us/solutions/public/8000/100/sol8115.html- Sachin_Dixit_13
Nimbostratus
Yes I have HTTP::header remove "Accept-Encoding" command in HTTP_REQUEST event
- nitass_89166
Noctilucent
did you remove accept-encoding request header?
Since HTTP compression on the server prevents the BIG-IP system from reading the data stream and performing the intended replacement, you may need to configure the HTTP profile to remove the Accept-Encoding header in the request to prevent compression by the server.
sol8115: Overview of the Stream profile
https://support.f5.com/kb/en-us/solutions/public/8000/100/sol8115.html- Sachin_Dixit_13
Nimbostratus
Yes I have HTTP::header remove "Accept-Encoding" command in HTTP_REQUEST event
- nitass
Employee
can you try STREAM_MATCHED to see if it matches?
STREAM_MATCHED
https://devcentral.f5.com/wiki/iRules.STREAM_MATCHED.ashx
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