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
1,284
questions
2
votes
1
answer
1k
views
Api gateway responsibility: good practices (authorisation, request transformation)
I am considering to use an api gateway on top of my micro-services. But there are some architectural questions for which I don't have clear answers, so I would like to get an opinion from community. ...
1
vote
1
answer
8k
views
spring-cloud-gateway RewritePath GatewayFilter not working
I am developing an spring-cloud-gateway application. Where I am using a RewritePath GatewayFilter for processing some pathvariable. Following is my downstream api running on port 80.
@GetMapping("/...
2
votes
0
answers
1k
views
Spring Cloud Gateway Redis RateLimiter Example
I have an use case where I have to pre-filter a soap request by a field in that message, and add a rate limiter base on IP to that route. I'm using Spring Cloud Gateway 2.0.0.RC2.
I used readBody() ...
1
vote
1
answer
1k
views
How can one configure retry for IOExceptions in Spring Cloud Gateway?
I see that Retry Filter supports retries based on http status codes. I would like to configure retries in case of io exceptions such as connection resets. Is that possible with Spring Cloud Gateway 2?
6
votes
2
answers
10k
views
Throwing Custom Runtime exception in Spring Cloud Gateway Filters
We are using Spring Cloud Gateway with Spring Boot 2 and reactive WebFlux module.
There is an authentication filter which is added for one of the routes. Now if we throw a RuntimeException with a ...
5
votes
4
answers
11k
views
Spring Cloud Gateway API - Context-path on routes not working
I have setup context-path in application.yml
server:
port: 4177
max-http-header-size: 65536
tomcat.accesslog:
enabled: true
servlet:
context-path: /gb-integration
And I have ...
2
votes
1
answer
41
views
Maximum Reusability for Two Implementations with Different Dependencies
I have a task that includes migrating an API Gateway from Zuul to Spring Cloud Gateway. There are two main versions currently: 1.0.1.RELEASE and 2.0.0.RC1. The first version is very basic and I'd have ...
6
votes
0
answers
9k
views
Simple Gateway Using Spring Cloud Gateway - ProxyExchange
I wanted to write a simple gateway using spring cloud, so that requests to a third party would appear to come from my service (as I have done so in the past with Zuul).
The example on the github page ...
7
votes
2
answers
16k
views
How to modify the response body in Spring Cloud Gateway just before the commit
I'm using Spring Cloud Gateway with Spring 5, Spring Reactor and Netty for a project. For every request send to the gateway I want to do something just before the response is sent to the client. The ...
4
votes
1
answer
6k
views
Spring Cloud Gateway - Redirect Based on Header
Just using Spring Cloud Gateway, I'm currently proxying a remote site with the following route (defined in Kotlin):
@GetMapping("/proxgoo/**")
@Throws(Exception::class)
fun proxyPath(proxy: ...
9
votes
2
answers
22k
views
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 ...
2
votes
1
answer
2k
views
Spring Cloud Gateway with SSL cannot route to service by name
I had enable SSL on Spring Cloud Gateway service, and after that routing such as
.route("instruments-ui", r -> r.path("/instruments/**")
.filters(f -> f....
18
votes
4
answers
25k
views
Spring Cloud Gateway inject header
In the GatewayFilter, I am trying to inject a header into the request like below.
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
//DO ...
10
votes
3
answers
9k
views
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 ...
4
votes
0
answers
3k
views
Spring Cloud Gateway cache
I am testing Spring Cloud Gateway 2.0.0 M9. Is possible to cache a response in Spring Cloud Gateway API? The idea is to cache and URL with some parameters in the same way than a proxy cache. Maybe ...