Forum Discussion
Have you checked out the documentation on Triggered Pipeline Access Control? Let us know if there are gaps or more details that we could provide.
- VChupaev4 years agoNew 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- mbowen4 years agoEmployee
It seems your request is not simple, so a preflight OPTIONS request is being sent first to see if it’s safe to send. The Authorization header may make it non-simple. Anyway, you’re failing on this request.
In your first experiment, did you try an explicit origin (that is, no * wildcard). It looks like it, but want to verify.
I think you should be ok going from HTTP → HTTPS.
The error message in your screenshot says No Access-Control-Allow-Origin header is present on the requested resource for the preflight request. It seems something is missing in the request.
This article touches on how to avoid preflight and other thing to check for – it’s pretty good.
- tlikarish4 years agoEmployee
Hi Vitaly,
The Manage CORS Allowlist is a list of regexes that we compare against the
Origin
header. If the regex matches, then theAccess-Control-Allow-Headers
andAccess-Control-Allow-Origin
are set in the response.I think in your first attempt you included a trailing slash, which caused the mismatch.
In the second attempt, the regex that was passed in was missing a.
in front of the*
, so it wasn’t matching either.Could you try this setting and let me know how it goes?
http://.*\.msgfocus\.com
If you want to try some regex out before, there are some useful sites for building expressions like this one.
I’ll reach out to the docs team to improve the documentation.