Search code examples
spring-cloud-dataflow

CORS error when making call to spring-cloud-dataflow-server-local


When I'm making a GET call to spring-cloud-dataflow-server-local from my webapp, I get this error:

XMLHttpRequest cannot load http://localhost:9393/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:7002' is therefore not allowed access. The response had HTTP status code 403.

How can I adjust this?

Please help, thanks!


Solution

  • We currently have an open issue regarding Cross-Origin (CORS) support:

    https://github.com/spring-cloud/spring-cloud-dataflow/issues/1048

    We hope to have that addressed for the upcoming RC release.

    If you have a client web-application (during development, e.g. Grunt / Gulp etc.), you have to ensure (using proxy plugin) that the Origin header corresponds to the Spring Cloud Data Flow host.