I'm using ProxyHttpClient in HttpServerFilter to proxy requests to another service as described in documentation https://docs.micronaut.io/latest/guide/#proxyClient . Works fine, but in some cases service returns MOVED_PERMANENTLY and I need to change the host location of the redirect. Lets say service responds with location to service A but I need to send request to service B. Can I use any filter to rewrite location ?
I tried to use @RequestFilter but it looks that changed location comes to late and request is not send to changed host. I also tried to mutate Request but host is immutable in @RequestFilter.