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
10
votes
3 answers

use spring cloud gateway with oauth2

i face a problem when i using spring cloud gateway is if any dependency call spring-boot-starter-tomcat directly or recursively it will not work because it will start the embedded tomcat server not the netty server that spring cloud gateway use…
ashraf revo
  • 767
  • 2
  • 12
  • 24
9
votes
0 answers

How is Spring Cloud Gateway is different from Zuul-2

I want to understand the technical differences between Netflix Zuul2 and Spring Cloud Gateway. Spring Cloud Gateway is async so is Zuul2 Both support Http2 Both support Route filter (functional routes) Both using on Netty
SyntaX
  • 2,090
  • 17
  • 30
8
votes
0 answers

Disable default-filters on specific route - Spring Cloud Gateway

I'm using Spring Cloud Gateway, and I have a use-case where I need to skip default-filters for a specific route. The documentation does not say anything about this option, is there any way to achieve it? I cannot find any clues in the source code…
Balázs Németh
  • 6,222
  • 9
  • 45
  • 60
8
votes
2 answers

How to use a Spring Cloud Gateway Custom Filter to filter every request?

It's my first time at Spring Cloud Gateway implementation. I need filter every request and apply a filter validation on some paths. Following the Baeldung Custom Filters tutorial I make a simple application to filter requests. The application must…
8
votes
2 answers

Spring Cloud Gateway Cors issue

I'm having issues setting up CORS configuration in a spring cloud gateway app. I've set the following config to allow everything from everything: spring: cloud: gateway: globalcors: corsConfigurations: '[/**]': …
Nicolas Widart
  • 1,187
  • 4
  • 13
  • 30
8
votes
2 answers

Spring Cloud Gateway and DiscoveryClient Routes

I am trying to migrate a gateway that's working using spring-cloud-starter-netflix-zuul to Spring Cloud Gateway, and I'm running into issues with request routing. I ran across the following documentation regarding configuring predicates and filters…
Keith Bennett
  • 733
  • 11
  • 25
8
votes
1 answer

Spring Cloud Gateway Dynamic Routing

Really new to Spring Cloud Gateway - but it "seems" easy enough. One issue I'm really struggling with. My requirement is to prefix the path, inspect a header variable, look up the URI based on that variable, and chug along after that. The…
Simi
  • 91
  • 1
  • 1
  • 3
8
votes
3 answers

Increase or remove content length restrictions in Spring-Boot's embedded Netty

I'm putting a Spring Cloud Gateway in front of some existing microservices. It mostly works, but I have a websocket (SockJS) connection which (apparently) transfers huge amounts of data. Turns out that Netty apparently has a content length maximum…
Roddy of the Frozen Peas
  • 14,380
  • 9
  • 49
  • 99
8
votes
2 answers

How to read the request body with spring webflux

I'm using Spring 5, Netty and Spring webflux to develop and API Gateway. Sometime I want the request to be stopped by the gateway but I also want to read the body of the request to log it for example and return an error to the client. I try to do…
user9349304
7
votes
2 answers

Spring Cloud Gateway as a gateway as well as web application

I have a spring cloud gateway application and what I want is like if there are two routes then on one route it should redirect to some external application but for other route it should forward the request to same app with a particular url. -id:…
7
votes
4 answers

404 error in spring cloud gateway for every alternate request

I am encountering a very peculiar problem in spring cloud gateway. Every alternate request returns a 404. This happens across all services I've configured in the api-gateway without exception. I don't even know where to start to debug this problem.…
horatius
  • 784
  • 1
  • 12
  • 30
7
votes
2 answers

Spring Cloud Gateway Use predicate to check header authorization

Is it possible to use the predicate section of the spring cloud gateway config to check the header authorization, my goal is to have some basic auth on one or more endpoints I'm using application.yml for route configuration cloud: gateway: …
Colm Cooney
  • 145
  • 2
  • 11
7
votes
1 answer

Does someone implement Jaeger with Spring Cloud Gateway?

We are re-building our software platform using a microservice architecture approach. Most of it using Spring Boot libraries, and for our entry points we are using Spring Cloud Gateway which can be easily integrated with Jaeger to have tracing in the…
NOrbes
  • 81
  • 6
7
votes
1 answer

How to configure spring-cloud-gateway to use sleuth to log request/response body

I am looking to develop a gateway server based on spring-cloud-gateway:2.0.2-RELEASE and would like to utilize sleuth for logging purposes. I have sleuth running since when I write to the log I see the Sleuth details (span Id, etc), but I an hoping…
brunch
  • 623
  • 1
  • 6
  • 11
7
votes
1 answer

read request body in webflux

public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { Flux body = exchange.getRequest().getBody(); //Return different according to body content... if (condition) { return…
1
2
3
76 77