Forum Discussion

debashish_bose's avatar
debashish_bose
New Contributor II
7 years ago

CORS Setting in Cloudplex

I have created triggered task in cloudplex which is tested & working from postman but the same is not working from javascript. Just want to know if any one done any setup for Cross Origin Request Sharing (CORS) in snaplogic cloudplex

7 Replies

  • debashish_bose's avatar
    debashish_bose
    New Contributor II

    Yes I have read the documentation & configured accordingly Now its working fine 🙂

    • VChupaev's avatar
      VChupaev
      New Contributor II

      Hi, tlikarish,
      I faced with the same CORS issue as described above.
      I have a triggered task, which is requested from another domain in JavaScript with the XMLHttpRequest object.
      I use the cloud URL, the Snaplex is set to Cloudplex, the CORS allow list contains the domain the request is coming from, but it still doesn’t work.

      First attempt with .*msgfocus.com as in documentation

      Second one with *.msgfocus.com

      In all cases there is an error

      It is also stated in the documentation: " Contact SnapLogic Support to configure this setting."

      Possibly there is something else to do to enable this option?

      Thank you,
      Vitaly Chupaev

  • VChupaev's avatar
    VChupaev
    New Contributor II

    Hi, @mbowen,
    yes the request sends the Authorization header, since it is a call to the SL task, which requires a token, so looks like I cannot avoid a preflight call.
    I tried a host without asterisk, actually I have both records at the same time - with full domain and with wildcard.
    Actually I expected that after setting the Allowlist I will have Access-Control-Allow-Origin header in response.
    I want to understand where is a problem, I can think about these reasons:

    1. The SL profile is not configured to work with CORS and requires assistance from your side.
    2. The allowlist has incorrect values.

    Thank you.