0

I am running a HTML application, which has JavaScript code for HTTP request. This JavaScript code further calls (POST API) Confluent Kafka server running locally on same Macbook.

This HTML app is running locally on Tomcat server.

Failed to load http://localhost:8082/topics/topictest: 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:8080' is therefore not allowed access.

When I run this HTML app which has JavaScript POST XMLHttpRequest, I am getting the above error in Browser console.

Could you please advise, what I'm doing wrong here?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Stella
  • 1,728
  • 5
  • 41
  • 95

1 Answers1

0

From what I understand, You might want to check your CORS settings in Kafka server. If you are still having issues after that, you might also want to check the following resources.

  1. CORS XMLHttpRequests in Javascript
  2. If you are using localhost in chrome
Wai Yan
  • 582
  • 9
  • 22