georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 5 forks source link

Set rewrite location as in request #108

Closed f-necas closed 4 months ago

f-necas commented 5 months ago

In order to solve issues mentionned in https://github.com/georchestra/georchestra-gateway/pull/104, this option allows redirections to work correctly and to keep tests working.

Also closes : #105

pmauduit commented 5 months ago

I am confused: so it was only the redirect responses that were causing trouble in #104 ?

f-necas commented 5 months ago

As I understand, yes. But I caught a new error with this solution.

When setting a route like :

      - id: root
        uri: ${georchestra.gateway.services.my.target}
        predicates:
        - Path=/
        filters:
        - RedirectTo=308, /my/home

It ends up with a :

Error starting response. Replying er │
│                                                                                                                                                                                                   │
│ java.lang.UnsupportedOperationException: null                                                                                                                                                     │
│     at org.springframework.http.ReadOnlyHttpHeaders.set(ReadOnlyHttpHeaders.java:106) ~[spring-web-5.3.27.jar:5.3.27]                                                                             │
│     Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException