I am working on a web-based app with angular and spring boot. Jwt is generated and the user can log in but when I want to get user information after login it shows this error on the browser:
Access to XMLHttpRequest at 'http://localhost:8080/api/user/' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
And in IntelliJ it says: JWT Token does not begin with Bearer String
What should I do?