0

I can't send requests with swagger ui. Here's the error:

Access to fetch at 'http://localhost:8080/events' from origin 'https://editor.swagger.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

The same in Intellij idea.

I've tried everything from here. In intellij I've checked "Allow unsigned requests" box in File | Settings | Build, Execution, Deployment | Debugger, but that also didn't work.

Does anybody know how to fix this CORS thing?

Aleksey
  • 3
  • 1
  • You need to enable CORS on your API server that is running on `localhost:8080`. See https://enable-cors.org/server.html – Helen Dec 06 '22 at 12:44

0 Answers0