0 Replies Latest reply on Feb 13, 2018 2:05 AM by ashishdeole

    setting origin header to match allowedhosts for consuming apis

    ashishdeole

      Hi,

       

      We need to consume apis which are CORS enabled and allow only some hosts. The api owner allows null to be added to allowed hosts but not file://.

      The web app and iOS app works well when consuming these apis. For webapp the web server host is whitelisted. For iOS, we are able to set origin to null.

       

      But we are unable to get it working for android platform. It is not allowing us to set origin header to null. What is the correct way to consume such apis. We have single codebase for web app, iOS and android app. We are using backboneJS/

       

      Kindly let me know if more information is required.

       

      Thanks and Regards

      Ashish