Forum Discussion

Preet_pk's avatar
Preet_pk
Icon for Cirrus rankCirrus
Feb 28, 2021

iRule to proxy Hybris website over F5.

Hi,

 

As part of publishing Hybris website over F5, so that mobile user can access the Hybris website, we have created irule in F5 as below.

 

when HTTP_REQUEST {

   STREAM::disable

if { [HTTP::host] equals "mdm.x.co.ae"} {

      HTTP::header replace host "mdm.x.x.ondemand.com"

       pool HYBRIS-POOL }

}

 

 

when HTTP_RESPONSE {

   if { [HTTP::header exists Location] } {

 

 

       HTTP::header replace Location [string map {https://api.x.x.ondemand.com htps://api.x.co.ae} [HTTP::header Location]    ]      

   }

 

 

   STREAM::expression {@https://api.x.x.ondemand.com@https://api.x.co.ae@ }

   STREAM::enable

}

 

While accessing "https://mdm.x.co.ae" page is not opening properly.

Below is the error details for site which is working fine when bypassing F5, and over F5.

 

https://api.x.co.ae/rest/v2/mdm/cms/pages?fields=DEFAULT&pageType=ContentPage&pageLabelOrId=homepage&lang=en&curr=AED  - Working one bypassing F5

 

https://api.x.co.ae/rest/v2/mdm/cms/pages?fields=DEFAULT&pageType=ContentPage&pageLabelOrId=/not-found&lang=en&curr=AED - Non working one

No RepliesBe the first to reply