Home > Back-end >  Access to XMLHttpRequest at 'http://localhost:8080/blog/updatePost/2' from origin 'ht
Access to XMLHttpRequest at 'http://localhost:8080/blog/updatePost/2' from origin 'ht

Time:11-01

Even though I used @CrossOrigin annotation this error still appears. Spring boot app is running on 8080 port and react app is running on 3000 port.

image of backend controller

Error:

Error in console

If further information is needed, please let me know.

CodePudding user response:

I assume you are using spring security. @CrossOrigin filter might have a lower precedence over spring security filters. Try to configure CORS using spring security.

  • Related