Questions tagged [spring-cloud-gateway]

Spring Cloud Gateway is an API Gateway library on top of the Spring reactive ecosystem. Use this tag when encountering issues with Spring Cloud Gateway components.

spring-cloud-gateway provides a library for building an API Gateway on top of Spring MVC. Spring Cloud Gateway aims to provide a simple, yet effective way to route to APIs and provide cross cutting concerns to them such as: security, monitoring/metrics, and resiliency.)..

1147 questions
110
votes
2 answers

How is Spring Cloud Gateway different from Zuul?

I have been using Zuul as the edge service and API Gateway. Recently I have noticed that Spring Cloud Platform release Spring Cloud Gateway. What is the difference between the two gateways? Why is the Zuul not extended to support the functionalities…
27
votes
4 answers

Spring Cloud Gateway - Proxy/Forward the entire sub part of URL

I am using Spring Cloud Gateway 2.0.0.M6 testing a simple gateway. I just want a URL to be forwarded to another URL with ** regex Example 1: /integration/sbl/foo/bar => localhost:4178/a-integration/sbl/foo/bar Example 2: /integration/sbl/baz/bad =>…
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
22
votes
4 answers

SpringCloudGateway - Log incoming request url and corresponding route URI

I am new to spring cloud gateway, what I want is to log incoming request to corresponding route url, For e.g. if I have following route config: - id: route1 uri: http://localhost:8585/ predicates: - Path=/foo/** …
JavaCodeNet
  • 1,115
  • 1
  • 15
  • 21
20
votes
4 answers

Gateway timeout with Spring cloud gateway and Nginx as reverse proxy

I created an API gateway for my application and it will act as a front controller for other microservices. In my production setup I use Nginx as a reverse proxy for my gateway The API gateway is running on port 8080 Nginx configured as…
Nitin
  • 2,701
  • 2
  • 30
  • 60
19
votes
4 answers

Spring Cloud Gateway; Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway Issue

I got this below error when run the API-GATEWAY, I tried so many ways but I couldn't solve this issue. Description: Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway. Action: Please set…
Manoj Piyumal
  • 219
  • 1
  • 2
  • 10
18
votes
3 answers

Spring Cloud Gateway inject header

In the GatewayFilter, I am trying to inject a header into the request like below. @Override public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { //DO SOME AUTHORIZATION OPERATIONS String jwt =…
thaneesh shanand
  • 453
  • 1
  • 5
  • 14
17
votes
8 answers

Spring Boot API Gateway Unable to resolve name

Api calls via gateway throws java.net.UnknownHostException even though I am able to hit the application directly with the given hostname Spring Boot version : 2.4.2 Spring-cloud.version: 2020.0.1 Java version: 11 Note: Samething works with spring…
Anonymous
  • 325
  • 1
  • 3
  • 8
14
votes
2 answers

How good is Krakend compared to Kong?

I am stuck in choosing One API gateway from the three API gateways mentioned below: KrakenD (https://www.krakend.io/) Kong (https://konghq.com/kong/) Spring Cloud Gateway (https://cloud.spring.io/spring-cloud-gateway/reference/html/) My…
14
votes
1 answer

Working example of Spring Cloud Gateway with Redis session management?

Can you please point out any written or video tutorial of working example of spring-cloud-starter-gateway? Using spring-session-data-redis, Spring Boot 2 and possibly related libraries e.g. spring security? Basically, I want to use the Spring…
bkk
  • 307
  • 5
  • 22
12
votes
1 answer

Should Kubernetes Ingress lives together with a Spring Cloud Gateway?

Small architecture and design question please. Question: Should Kubernetes Ingress lives together with Spring Cloud Gateway? If not, which one should be preferred? First, with a Spring Webflux / Spring Cloud Gateway project, I managed to have…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
11
votes
5 answers

Get request body string from ServerHttpRequest / Flux

I am using spring boot version - 2.0.6.RELEASE and spring cloud version - Finchley.SR2 and i have created my custom gateway filter to modify the request body. but while converting the request body to string using Flux i am getting a empty string. i…
bhavishya singh
  • 121
  • 1
  • 1
  • 5
11
votes
3 answers

Spring Cloud Gateway or Zuul2, Which one is the right replacement for Zuul1?

Since Spring Cloud team has abandoned development of Zuul module, we are moving to Spring Cloud Gateway or Zuul2 but I believe Zuul2 needs a lot of changes in the architecture and needs big changes in the microservices(correct me if i'm wrong), can…
Kyle
  • 330
  • 1
  • 4
  • 13
11
votes
3 answers

How to set up Spring Cloud Gateway application so it can use the Service Discovery of Spring Cloud Kubernetes?

I created two Spring Boot applications which both will be deployed in a Kubernetes cluster. One of those apps will act as a gateway and therefore uses Spring Cloud Gateway as a dependency. Also I want to integrate service discovery with Spring Cloud…
10
votes
5 answers

springcloud api gateway properties file declaring variables

I have application.yaml in springboot app as below spring: cloud: gateway: routes: - id: pgService uri: http://localhost:2005/ predicates: - Path=/employee/** - id: inMateService uri:…
10
votes
1 answer

Forbid Unauthenticated requests in Spring Cloud Gateway

I have implemented custom pre filter in spring cloud gateway which allows authenticated requests to go through the downstream process. What I want is if the request is unauthenticated then return with response of 401 UNAUTHORIZE status and stop the…
JavaCodeNet
  • 1,115
  • 1
  • 15
  • 21
1
2 3
76 77