I have a Spring Boot web app with the usual routings:
@GetMapping("/account")
public String search(@RequestParam(value="search"...
I've now deployed this behind an AWS Application Load Balancer, where I have used path based routing to target my app.
I've configured /admin/*
on the Load Balancer to forward to my app, which works fine.
The issue though is that my app is now seeing /admin/account
, rather than the /account
it is expecting.
AWS says:
Note that the path pattern is used to route requests but does not alter them. For example, if a rule has a path pattern of /img/*, the rule would forward a request for /img/picture.jpg to the specified target group as a request for /img/picture.jpg.
Is there any tidy way around this? Or do I have to resort to something like this:
@GetMapping("*/account")