Web Application

Handle CORS issue in Spring Boot application

in order to stop browser from blocking API request.

Donald Le
Oct 22, 2021

--

  • Global configuration

Disable cors and csrf, along with setting allowedHeaders for CORSConfiguration

  • Controller configuration

Need to annotate CrossOrigin for Controller class and for each API definition

Hope it helps~~

Enjoy coding~~

--

--

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.