tutorials
tutorials copied to clipboard
Spring Security Angular "request from origin ... blocked by CORS policy"
I am looking at the Spring Security Angular module provided and from everything I read and tried, it does not make sense as it does not mentions CORS at all.
- The HttpSecurity configuration is missing it,
- There is no CorsConfigurationSource anywhere
- And the default Spring provided /login is overriden by a login controller which usually is not needed
Would you be able to provide more details on CORS as all I get is error like:
Access to XMLHttpRequest at 'http://localhost:8080/myapi/v1/auth' 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.
, when trying to login.