79203465

Date: 2024-11-19 12:47:43
Score: 2
Natty:
Report link

Same issue with circuitbreaker. The problem are the ReadOnlyHttpHeaders from netty.

java.lang.UnsupportedOperationException: null at org.springframework.http.ReadOnlyHttpHeaders.remove(ReadOnlyHttpHeaders.java:135)

https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/gatewayfilter-factories/removerequestheader-factory.html also not working.

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
        </dependency>
spring:
  cloud:
    gateway:
      routes:
        - id: test-route
          uri: id: test-route
          uri: http://httpbin.org/
          predicates:
            - Path=/test/**
          filters:
            - StripPrefix=1
            - name: CircuitBreaker
              args:
                name: exampleCircuitBreaker
                fallbackUri: forward:/fallback
Reasons:
  • RegEx Blacklisted phrase (1): Same issue
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: TechnicalFreak