package ru.rodionovsasha.shoppinglist;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class AppConfiguration implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**");
    }
}

@@ -407,24 +407,121 @@
 stry
-.addMapping(%22/**
+%0A                .addMapping(%22/v1/api/**%22)%0A                .allowedMethods(%22GET%22, %22POST%22, %22PATCH%22, %22PUT%22, %22DELETE
 %22);%0A

Enable CORS