Skip to main content

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 vote
2 answers
15k views

How to get Original response body in Spring cloud gateway (Webflux) Post filter

I've implemented a Post filter in the spring cloud gateway. But I need the readable format (JSON Format of response body) before sending it to UI. I'm getting exchange.getResponse(). (when i printed ...
Dev-eloper's user avatar
29 votes
4 answers
68k views

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/...
Shervin Asgari's user avatar
11 votes
5 answers
17k views

Get request body string from ServerHttpRequest / Flux<DataBuffer>

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 ...
bhavishya singh's user avatar
111 votes
1 answer
53k views

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 ...
zeagord's user avatar
  • 2,317
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 ...
thaneesh shanand's user avatar
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 ...
ashraf revo's user avatar
10 votes
5 answers
22k views

Spring Cloud Gateway doesn't work with DiscoveryClientRouteDefinitionLocator

I was working with Spring cloud gateway when i use routes statique like this (It works fine) : @Bean RouteLocator routeLocator(RouteLocatorBuilder builder) { return builder.routes() ....
Ayoub Jebji's user avatar
9 votes
18 answers
50k views

Spring Cloud API Gateway routing not working

I have designed a micro service prototype using below technologies Eureka Server a service Spring Cloud API Gateway Above mentioned service are registered in the Eureka Server API Gateway routing ...
arj's user avatar
  • 973
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 ...
Pit's user avatar
  • 71
5 votes
4 answers
5k views

How to get trace-id in spring-cloud-gateway using micrometer-brave

I want to display traceId in logs for each request in Spring Cloud Gateway. However, traceId and spanId are just empty. Log config is like below: logging: pattern: level: "%5p [TRACE_ID: %X{...
Murad Zulfugarov's user avatar
4 votes
2 answers
4k views

Spring Cloud Gate Request Timeout Not working for path

In Spring cloud Gateway request timeout for path in not working as expected. I tried to specify global timeout, but its not working as expected. I am trying to call a microservice A. In A microservice ...
Kuldeep's user avatar
  • 639
4 votes
1 answer
3k views

Create route in Spring Cloud Gateway with OAuth2 Resource Owner Password grant type

How to configure a route in Spring Cloud Gateway to use an OAuth2 client with authorization-grant-type: password? In other words, how to add the Authorization header with the token in the requests to ...
rigon's user avatar
  • 1,390
4 votes
1 answer
8k views

Spring Cloud Gateway POST Forbidden

I have a resource service behind Cloud Gateway route with RelayToken filter: routes: - id: apis uri: http://rest-app:8080/apis predicates: - Path=/apis/**...
Tom Sawer's user avatar
  • 182
4 votes
1 answer
6k views

How to disable global CORS config in Spring Cloud Gateway .yml config to allow requests from any origin?

I want to create a gateway service for my microservice app and I add the configs that mentioned in spring cloud gateway documentation to disable CORS in the gateway: spring: # GATEWAY CONFIG cloud:...
Dana Amiri's user avatar
3 votes
2 answers
9k views

Spring Cloud Gateway - modify response body in global Post filter

I have spent the last 2 days trying every possible way of modifying the response body of a request before it hits the client, and nothing seems to work for me. So far I have tried the implementations ...
Hristo Naydenov's user avatar

15 30 50 per page
1
2 3 4 5 6