Forum Discussion

NoamRotter's avatar
NoamRotter
Icon for Altostratus rankAltostratus
Apr 17, 2016

How to change HTTP method from OPTIONS to POST?

We have a webapp that sends a HTTP:method "OPTIONS" to another website

 

The other website returns 400 bad request for method OPTIONS.

 

If I manually change the OPTIONS to POST the transactions is successful (manually by using fiddler)

 

I cannot change the method on the sending webapp server

 

Since that, I must change it using BIGIP

 

How can BIGIP convert method OPTIONS to POST?

 

I need the other web server sees POST request and not OPTIONS request.

 

Any solution will be good. iRule/streaming etc...

 

 

Thank you,

 

Noam.

 

  • Hi,

    it is not possible to change HTTP Method...

    The method OPTIONS is dedicated to answer which are supported methods by the server.

    try this irule to answer with the list of supported methods:

    when HTTP_REQUEST {
        if {[HTTP::method] equals "OPTIONS"} {
            HTTP::respond 200 -version "1.1" noserver \
                "Allow" "OPTIONS, TRACE, GET, HEAD, POST" \
                "Public" "OPTIONS, TRACE, GET, HEAD, POST" \
                "Connection" "Close"
        }
    }
    
  • M_2's avatar
    M_2
    Icon for Altocumulus rankAltocumulus
    Hello Noam, would you mind telling the details about webapp that sends a HTTP:method "OPTIONS. Just to know the application name. Thanks, -Sam
  • It's a "solution" written for us and uploaded by developers to our old CRM 2011 system. We couldn't ask the developers to make any changes to their solution.