ali-bouali / spring-boot-3-jwt-security

Sample project on how to implement JWT security based using Spring boot 3 and Spring security 6

Home Page:https://aliboucoding.com/p/securing-your-spring-boot-3-0-applications-with-json-web-tokens-jwt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS error on sending authenticated request from a different route

juliantjg opened this issue · comments

I'm trying to call an authenticated only API from a react server on localhost:3000, and got a CORS error:
The CORS request requires preflight, preflighting could not be performed. . Anyone encountered this problem yet? I tried disabling the cors from the securityChainFilter but to no avail. Thanks

as @marcosfaneli mentioned, you need to add a cors configuration if you want to access the backend from a browser (frontend application for example)