DEV Community

Cover image for SOS : CORS is making my life a living hell
WIWI
WIWI

Posted on

SOS : CORS is making my life a living hell

Hello there , how are you , sorry for the clickbait but I really need your help .I am a beginner so please understand where all this comes from .
I had created a multi step form using ReactJs , the whole think is working ( i guess haha ) , it should connect with my backend application that uses Spring boot. when I press the submit button , I received this message :
Image description

I tried to check the code multiple times , to add and substract few things , I EVEN TRIED TO CHANGE THE WEB BROWSER , very dumb I know , but this goes to say that I tried everything that could come to my brain ,and honestly this is making feel so helpless .
Hope I made myself clear enough .

Top comments (1)

Collapse
 
zamoula profile image
zamoula

In ur spring boot project , annotate ur controller with
@CrossOrigin(origins = "localhost:your_frontend_port")