How do I resolve CORS in Apache Ignite?

Deadly 提交于 2019-11-28 10:49:59

问题


I have an Apache Ignite server running in a basic Java application. The Ignite REST api is exposed on a certain port. When I hit it from the browser, it is returning the desired response. However, from an Angular app, I am getting CORS error.

Is there any solution to this? Note that this application runs Ignite REST api (the one which is giving the CORS). How do I allow cross-origins inside the Ignite REST api?


回答1:


Unfortunately I haven't heard about the right way to achieve that. CORS filtration in Jetty is configurable through Servlet filtration API. This functionality is provided by ServletHandler. It seems that Ignite utilizes its own Handler to serve HTTP requests. As far as I understand it doesn't support cross-domain requests.

In general I don't think that it's good idea to direct HTTP request to an Ignite cluster from a browser. It doesn't look absolutely secure and architecturally correct. I'd prefer to have separate back-end application which should be responsible for processing of your Angular application load.



来源:https://stackoverflow.com/questions/58004919/how-do-i-resolve-cors-in-apache-ignite

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!