1

My Name is Mitesh Jain, I am new to Unomi.

All installations are done according to this link:

http://unomi.incubator.apache.org/

When I am trying to access the rest api cxs to fetch all the rules, it is showing properly in browser when I browse, https://localhost:9443/cxs/rules

but when I am trying to access the same using my Angular application to fetch rules using above url, https://localhost:9443/cxs/rules it will make a OPTIONS call and I am getting the error as "No 'Access-Control-Allow-Origin' header is present on the requested resource."

Rest API document here: http://unomi.incubator.apache.org/rest-api-doc/index.html#-1505954579

Please Let me know how to fix this CORS issue.

user2638707
  • 196
  • 2
  • 8
  • Possible duplicate of [API Gateway CORS: no 'Access-Control-Allow-Origin' header](https://stackoverflow.com/questions/35190615/api-gateway-cors-no-access-control-allow-origin-header) –  Mar 07 '18 at 07:43

1 Answers1

1

Yes this is probably a CORS issue. I only see one reference to CORS in the documentation here in the Javascript section.

Try using Content-Type as text/plain;charset=UTF-8 in your request header.

This should allow the preflight check to pass, more details here.

Mike
  • 2,514
  • 2
  • 23
  • 37