Forum Discussion

mike_61630's avatar
mike_61630
Icon for Nimbostratus rankNimbostratus
Dec 28, 2009

Change HTTP response code

Hi,

 

 

I would like to know if It's possible to change the HTTP response code with an Irule.

 

 

My F5-ASM is blocking response pages with code 500.

 

 

I would like to change, with an Irule, the return code of some pages with code 500 to code 200, so they no be blocked.

 

 

I'm trying to do It with HTTP_RESPONSE event but it doesn't work.

 

 

 

Thanks.
  • Mike: this may be tricky. I believe the issue here is that ASM is processing the response flow before the iRules engine is. This means you won't be able to successfully do this with an iRule. Someone please correct me here if I am wrong about this.

     

     

    That said, with version 10.1 you've got ASM events inside of iRules, so you may be able to accomplish this. Would a custom response page suffice though? I'm curious as to why you'd want to turn a 500 Internal Server Error into a 200 OK, and I'd love to understand this use case a bit more...

     

     

    -Matt