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
0
votes
0 answers

How to disable/configure the Spring Cloud Gateway rewriting of Location headers

We have a setup with Spring Cloud Gateway running with consul service discovery and proxying requests to services in a cluster. When one of these services responds with a Location: / header this gets rewritten on the way out thru the gateway. The…
blkmr
  • 81
  • 1
  • 7
0
votes
0 answers

Handle Mono.empty() in GatewayFilter

I'm building a GatewayFilter, but I'm having problems handling cases where I don't have data. Here is a sample of the GatewayFilterFactory<>: return (exchange, chain) -> getDataFromRedis() .flatMap(redisData -> { …
fizixx
  • 163
  • 1
  • 10
0
votes
2 answers

How to retry an external service when a call to an internal service fails using spring cloud gateway?

I'm implementing a service that mocks another service available on the web. I'm trying to configure the spring cloud gateway to reroute requests to the public service when a call to my implementation fails. I tried using the Hystrix filter the…
Philippe
  • 6,703
  • 3
  • 30
  • 50
0
votes
0 answers

Generic service routing rule with Spring Cloud Gateway

I'm trying to make a generic route rule to my services using Spring Cloud Gateway and Consul. Services are correctly registered in Consul and the Gateway is finding them with no problem. The problem is, I want to make a generic rule to match my…
0
votes
1 answer

Spring cloud gateway route with multiple instances and sticky session

I'm pretty much new to spring cloud gateway. I have configured routing with two different apps with 'path'. Now, I need some help/docs on 1. How to route to different instance of an app from spring cloud gateway? 2. How to enable sticky session? My…
Raja Asthana
  • 2,080
  • 2
  • 19
  • 35
0
votes
1 answer

RetryGatewayFilterFactory configuration in spring-cloud-gateway

I am working on a gateway project using spring-cloud-gateway. I can see the Retry Filter is already present in the project's source code. But there are no documentation on how to configure it through yml congigurations. Any one worked with it or…
Arpan Das
  • 1,015
  • 3
  • 24
  • 57
0
votes
0 answers

spring cloud gateway routes data from inside server to outside client

A normal usage scenario is an outside client sends data to inside service through spring cloud gateway. How about the other way round, how to make inside service send request to client through spring cloud gateway too? For example: client sends…
Tiina
  • 4,285
  • 7
  • 44
  • 73
0
votes
1 answer

Credentials propagation from Spring Cloud Gateway to underlying service

I use Spring Cloud Gateway as UI gateway. Security config: @Bean SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) { return http.httpBasic().and() .formLogin().loginPage("/login") .and() …
0
votes
0 answers

spring cloud gateway throws Load balancer does not have available server for client

Eureka + Gateway + BackendServerA + BackendServerB. After BackendServerB is down, it throws exception: com.netflix.zuul.exception.ZuulException: Forwarding error Caused by: com.netflix.client.ClientException: Load balancer does not have available…
Tiina
  • 4,285
  • 7
  • 44
  • 73
0
votes
1 answer

How to set up login page in Spring Boot 2 with WebFlux?

I have created Spring Boot 2 WebFlux application (based on Spring Cloud Gateway project) and now try to configure custom login page instead of standard: @Bean SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) { return…
-1
votes
0 answers

Cors privaci Gateway Spring

I am using Angular + Spring. I split the application into microservices and use Eureka + Gateway. If I send requests from front to back not through gateway, everything worked (first I checked without eureka + gateway), but when I added gateway, it…
-1
votes
1 answer

How Do You Convert a Flux Webclient Get Response to ServerHttpResonse?

in my Spring Cloud Gateway filter, if a certain actions happens in the request flow, we would like to make a HTTP request to another service and return the result as the response. How do I use a Flux Webclient to make a request to a URL and then…
LucyEly
  • 63
  • 1
  • 13
-1
votes
3 answers

No 'Access-Control-Allow-Origin' header is present (CORS) - Spring Boot (Spring security) Microservices + Vue.js

I'm working on Spring Boot project based on microservices architecture on backend and Vue.js on frontend. Structure of my project is next: For avoiding CORS error usually I add @CrossOrigin annotation on to class and it works. It was all good and…
-1
votes
1 answer

How do you make WebFilter process requests that are not already handled by GlobalFilter?

Similar vein to GlobalFilter vs WebFilter. I want to do some header manipulation and logging but if something is already processed by GlobalFilter by the gateway the response is already set. Primarily I only want to put the webfilter for calls that…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
-1
votes
3 answers

my springcloud gateway hava a bug java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

spring cloud version : Greenwich.SR3 gateway version : 2.1.3.RELEASE this is a Weird bug ,my project start ok and test success, it is run some day , one day it is have this bug . I also check my cpu,memory,disk. only use 70%, and I test on my local,…
1 2 3
76
77