cors
This commit is contained in:
@@ -2,8 +2,10 @@ package konturai.kz.api_gateway;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = "konturai.kz.api_gateway")
|
||||
public class ApiGatewayApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -13,6 +13,10 @@ import reactor.core.publisher.Mono;
|
||||
@Component
|
||||
public class CorsHeaderFilter implements GlobalFilter, Ordered {
|
||||
|
||||
public CorsHeaderFilter() {
|
||||
System.out.println("CorsHeaderFilter created and registered!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
|
||||
Reference in New Issue
Block a user