Forum Discussion

houstonrob's avatar
houstonrob
Icon for Nimbostratus rankNimbostratus
Jan 19, 2016

Sharepoint: Change GET to POST

We recently changed our Sharepoint environment to https. Naturally, we have a http->https redirect just in case someone tries to hit it on port 80. We also have a number of workflows that Sharepoint uses that are creating a major problem for us. The workflows require the data be submitted as POST to the http url, but since they are redirected, they're being submitted as GET. The SP guys are saying they can't modify the fact that it starts out as http. I found an article about going from GET to POST (https://devcentral.f5.com/codeshare?sid=549) that looks extremely promising, the only problem is that the url is dynamic and I can't use HTTP::Host in the RULE_INIT event. Has anyone else had a similar problem or see a solution to my problem? Any help is greatly appreciated.

 

4 Replies

  • If you write your iRule that is doing the http to https redirect to use a 307 rather than a 301 or 302 the POST will be maintained in the redirect.

    when HTTP_REQUEST {
        HTTP::respond 307 noserver Location "https://[HTTP::host][HTTP::uri]"
    }
    
  • Hi Houstonrob,

     

    you should tell your SharePoint admins that the partial shift to HTTPS would leave possibilities for Man-in-the-Middle attacks. Each HTTP request can be intercepted, read in clear text and may also expose a risk to the entire HTTPS-site.

     

    The mentioned GET-to-POST workaround could be easily customized to use a dynamic POST-back URL. But the better solution would be to not use this workarounds at all...

     

    You may try the recomendation of Cody and fix the leftovers within the HTML/CSS/JSON/JS/etc. code. But for SharePoint it would become somewhat complex...

     

    The best approach would be to look again to the SharePoint site. Check if the site has appropiate AAM settings in place and then check if the embedded Workflows/SharePoint Solutions can be somehow changed to support either "" (absolute) or just "/xyz/file.ext" (relative to root)

     

    Note: Let me know if you really want to have a customized version of the GET-to-POST workaround, its a thing of one and a half minute to changs the code to support dynamic URLs. But again, if I where you, I wouldn't use it... ;-)

     

    Cheers, Kai

     

  • Thanks for the input everyone, the Sharepoint guys seemed to have figured out a temporary workaround for our problem while we figure out the best solution, whether it be a F5 change or something in the Sharepoint infrastructure itself. For what it's worth, the 307 seemed to be working

     

    Thanks!