All Questions
Tagged with spring-cloud-gateway spring-webflux
166
questions
0
votes
0
answers
33
views
How to call REST API using Spring Webclient in global post filter
Spring Cloud Gateway with WebFlux: 4.1.0
We have implemented couple of custom Global pre and post filters in our Spring Cloud Gateway application. We are using Spring WebClient utility to make call to ...
0
votes
0
answers
35
views
Spring Gateway routes not applied to multiple SecurityWebFilterChains
---> .csrf((c) -> {c.disable();}) for the /api/** security filter chain caused the following to happen for an unknown reason:
The issue is not having the gateway route filters and resources ...
0
votes
0
answers
37
views
spring cloud webflux with http2
I have a spring cloud webflux application, I want my application to work on the http2 protocol.
I create a certificate and keys through Keystore explorer, add them to the configuration of my gateway ...
0
votes
0
answers
31
views
PrematureCloseException in netty http client
We are using Spring Cloud Gateway (spring boot 2.7.X, JDK 11) to route request. To fetch/pass OAuth2.0 token before routing, filter is added to fetch it from OAuth2.0 provider, to make secure call to ...
0
votes
0
answers
36
views
[SpringCloudGateway]: Netty HttpClient failed to connect with SSLHandshakeException after establishing HTTPS connection with endpoint
We have built API Gateway application using Spring Cloud Gateway 4.0 (on webflux) framework and Azul Zulu OpendJDK 17. The application is able to intercept incoming request and redirect it to the ...
-1
votes
1
answer
57
views
How to get inputStream as return value from ServerHttpRequest in spring reactive?
I am writing a Spring Reactive implementation for a third-party SPI which is based on a traditional servlet. One method requires InputStream from request as return value:
/**
* Returns the request ...
0
votes
0
answers
69
views
Spring Cloud Gateway Custom Filter Handle Error Response
I have a customer filter in my spring cloud gateway and I am making a request with WebClient to validate authentication. If the response is 200 I want to continue with the execution/chain and if they ...
0
votes
0
answers
65
views
How to strip predicate path prefix from all the configured route configurations?
Our team is migrating the API Gateway application from Netflix Zuul 1.x framework to Spring Cloud Gateway (SCG) 4.0 framework. There are more than 30 routes configured in the SCG application in the ...
0
votes
0
answers
21
views
What is the right way of doing custom Authentication in spring WebFlux. In my configuration i have redirect after Authentication problem
I try to implement custom Authentication digital signature based in Spring Cloud Gateway. At this moment i just return true for signature validation.
public class AdsAuthenticationFilter implements ...
0
votes
1
answer
99
views
How to log request URI and body along with route in Spring Cloud Gateway?
I'm working on a Spring Cloud Gateway project and I need to log the incoming request URI, body, and associated route using a GlobalFilter. Is there a recommended approach to achieve this?
I've ...
0
votes
0
answers
157
views
how to enable http2 in spring cloud gateway
My spring cloud gateway(SCG) with reactive stack has enabled http2.
server:
port: 8080
shutdown: graceful
http2:
enabled: true
spring:
cloud:
gateway:
routes:
- id: id
...
0
votes
0
answers
30
views
[SpringCloudGateway-WebFlux]: How to return custom error response for Gateway timing out lingering downstream endpoint?
We have implemented our Gateway application using Spring Cloud Gateway 4.1.0 framework and it is able to intercept the incoming request and redirect to configured downstream endpoint.
We have ...
0
votes
1
answer
68
views
Cannot resolve method 'doOnSuccessOrError' in 'Mono'
I have this Spring Gateway code which I want to migrate to latest Spring Cloud 3:
@Component
public class CorrelationIdApiFilter implements WebFilter {
@Override
public Mono<Void> filter(...
0
votes
0
answers
88
views
Default /logout does not work if /login is customised spring security 5.7.11
Below is my security config:
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http){
http
.authorizeExchange(authorizeExchangeSpec ->
...
1
vote
0
answers
50
views
Spring Security: Only show login form when url parameter is present
I am using Spring Cloud Gateway (2023.0.0) and Spring Boot (3.2.3) with oauth2Login and formLogin.
Currently when the application is opened i am redirected to the login page. On the login page i can ...