LaurineDaSilva / ornis

Bird identification application. Main project for CDA title
1 stars 0 forks source link

[ORNIS-12] task: fix CORS #19

Closed LaurineDaSilva closed 1 year ago

LaurineDaSilva commented 1 year ago

ORNIS-12

For now the link between the back and the front is made with a @CORSMapping annotation in the bird controller.

Instead,

  1. Create a Configuration package
  2. Create a WebConfig Class (Config: name by convention but you can named WebConfiguration) and implement WebMvcConfigurer
  3. Create a addCorsMappings() method and add a @Configuration annotation
  4. Delete @CrossMapping in Controller files

Baeldung spring cors

Ornis's wiki reference