Closed ranveer-kumar closed 2 years ago
Enabled for All () for now. To restrict limited domains needs to be pass the list (replace with domain name in string as List) in the following file.
package com.spark.cms.config Class Name: CorsConfig
`@Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/graphql").allowedOrigins("*****"); //registry.addMapping("/graphql").allowedOrigins("http://localhost:4200"); } }; }`
Enabled for All () for now. To restrict limited domains needs to be pass the list (replace with domain name in string as List) in the following file.
package com.spark.cms.config Class Name: CorsConfig