Use a list of CIDR for trusted-proxies
Los mantenedores suelen responder en 1 día
@vasipallyn ya está trabajando en esto.
Desde el 13/11/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java, spring-boot
- Área
- backend, networking
Línea de trabajo
Start by finding where spring.cloud.gateway.server.webmvc.trusted-proxies is bound and where its regular expression is matched against the remote address, using a search for the property name. The issue asks for a list of IP addresses and CIDR ranges, including IPv6 such as ::1/128, in place of the regex. Done means the YAML example in the issue is accepted and matched correctly, with tests covering IPv4, IPv6 and non-matching addresses. Whether the regex form stays supported is a design question to confirm with maintainers.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
The spring.cloud.gateway.server.webmvc.trusted-proxies property currently uses a regular expression to identify trusted proxies.
However, getRemoteAddr() already returns the IP address of the client or the last proxy that sent the request:
/**
* Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. For HTTP servlets,
* same as the value of the CGI variable <code>REMOTE_ADDR</code>.
*
* @return a <code>String</code> containing the IP address of the client that sent the request
*/
Since this property is intended to identify trusted proxies based on their IP addresses, using regular expressions seems unnecessarily complex and makes the configuration harder to maintain.
Describe the solution you'd like
Replace the regular expression with a list of IP addresses and CIDR ranges.
For example:
spring:
cloud:
gateway:
server:
webmvc:
trusted-proxies:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 127.0.0.1/32
- ::1/128
- Lenguaje dominante
- Java
- Estrellas
- 4.9k
- Forks
- 3.5k
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de spring-cloud/spring-cloud-gateway
-
waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
spring-cloud/spring-cloud-gateway#4395 ·
Los mantenedores suelen responder en 1 día
-
RequestRateLimiterGatewayFilterFactory commits 429 response instead of throwingPosiblemente ocupada @seonwooj0810 la tomó hace 175 días. Abiertowaiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
spring-cloud/spring-cloud-gateway#4175 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add @Order annotation to gatewayRestClientCustomizer BeanPosiblemente ocupada @CheHyeonYeong la tomó hace 247 días. Abiertoenhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spring-cloud/spring-cloud-gateway#3626 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Ambiguity in section 19 of the documentation - Spring Cloud Gateway - Custom Route PredicatePosiblemente ocupada @won-seoop la tomó hace 173 días. Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
spring-cloud/spring-cloud-gateway#3463 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
waiting for feedback
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
spring-cloud/spring-cloud-gateway#4394 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de spring-cloud/spring-cloud-gateway
Issues similares
-
area:cpan-port area:performance bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#2230 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoAbiertoBug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día