Cors Issue while saving Js report template using Odata
-
Hi,
We have hosted Js report studio in aws load balancer ,and we access jsreport studio via api gateway from our angular application.Using odata api it is possible to get all template,folders but it throws cors error while save jsreport template using odata api.
How to enable cors using odata api?
-
hi! jsreport by default has CORS enabled, I have done a test from a simple app at
localhost:4000
and jsreport running atlocalhost:5488
and everything works as expected, both the preflight (the one with request methodOPTIONS
) and the normal request (the one with request methodPATCH
) pass1.- Preflight request
2.- Save request
in your case it seems to be failing at the first request, which is the preflight request, since you have the api gateway in front of the jsreport server, it seems to me that this is a problem related to the api gateway, have you enabled CORS there? it seems to be easy to enable that in the console, maybe you are missing that step