Remapping the APIs call
parent
126f441b07
commit
ab934d8804
@ -0,0 +1,16 @@
|
||||
package org.gcube.app.springbootangulardemo.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@Profile("development")
|
||||
public class DevCorsConfiguration implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/api/**").allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS");
|
||||
}
|
||||
}
|
@ -1 +1,2 @@
|
||||
|
||||
# application.properties
|
||||
spring.profiles.active=development
|
||||
|
@ -1 +1,2 @@
|
||||
|
||||
# application.properties
|
||||
spring.profiles.active=development
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue