Forum Discussion

rsacheen's avatar
rsacheen
Icon for Nimbostratus rankNimbostratus
Mar 30, 2017

Running iFile (javascript code) from iRule

Is it possible to execute javascript code written in an iFile from within iRule?

 

what I want to achieve is, something like below:

 

when CLIENT_ACCEPTED {

 

run the javascript code in iFile which sends request to particular server

 

check the response from destination server and set some flag

 

}

 

when HTTP_REQUEST {

 

direct traffic to some other pools based on flags set above

 

}

 

I would appreciate if anyone could provide me with the solution. Thank you!

 

3 Replies