2

I am facing some problem in my own Kafka(confluent) setup.

Please find the below issue

CORS Issue :- Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I googled and found below settings should be change in this file / home/kafka/confluent-5.0.0/etc/kafka-rest/kafka-rest.properties.

But by default below code is there. Still CORS is not working. In response the header "Access-Control-Allow-Origin" is not coming

access.control.allow.origin=*
access.control.allow.methods=GET,POST,PUT,DELETE,OPTIONS,HEAD

Advance thanks for your help.

Priyabrata
  • 629
  • 1
  • 8
  • 23
  • Is your system properly answering the _preflight_ request, or does that run into an error or something maybe, perhaps because you did not set up any routing for this particular request method? – misorude Nov 26 '18 at 13:46
  • @misorude I am getting status 200 OK with these headers `HTTP/1.1 200 OK Date: Mon, 26 Nov 2018 13:35:02 GMT Content-Type: application/vnd.sun.wadl+xml Allow: HEAD,POST,GET,OPTIONS Last-Modified: Mon, 26 Nov 2018 13:35:02 UTC Content-Length: 1832 Server: Jetty(9.4.11.v20180605)` – Priyabrata Nov 26 '18 at 13:48
  • What’s the request method of that? I doubt it is the actual preflight request. – misorude Nov 26 '18 at 13:50
  • @misorude It's a GET request – Priyabrata Nov 26 '18 at 13:50
  • A Preflight request uses the OPTIONS method. – misorude Nov 26 '18 at 15:57
  • could you please let us know what is the property `listeners=http://0.0.0.0:8081` set in etc/schema-registry/schema-registry.properties – user51 Nov 28 '18 at 16:36
  • @RajkumarNatarajan `listeners=http://0.0.0.0:8081` – Priyabrata Nov 30 '18 at 05:56

0 Answers0