Spring Boot Restful Service and CORS problem
I created a Restful service with Spring Boot and I am sending HTTP requests to this service with Angular. I was getting a CORS error when I sent a request with Angular and I used artificial intelligence to solve the error. In the first attempt, it asked me to suggested the following bean.
CORS policy problem…How can I solve it?
I’ve created a simple Rest application using Spring. When I try to enter the API using Angular I got this error
CORS Policy Issue with specific browser
Issue: origin ‘http://localhost:8100’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Access to XMLHttpRequest at ‘localhost:8080’ from origin ‘http://localhost:4200’ has been blocked by CORS policy
`I was trying to make a car rental application using Spring Boot and Angular, but I couldn’t get my carPost function to work. If I understand correctly, the problem is that my backend system is not allowing the request from my frontend system. I believe that this is caused by the jwt authentication system, but I am not completely sure. I apologize for asking for help for a recurring error despite reviewing multiple forum posts; my current level of proficiency on the topic is hindering my ability to solve it independently.