Not real clear on how it all fits together, but take a look at this and see if it resembles what you are doing.
As you can see I made progress up to a point, but then hit a wall and got very nervous about changing the basic way the file paths are specified. As the number of modules and changes to them mounted up, I realized there was no way to do the necessary testing required to ship that volume of changes.
I am thinking that it’s worth looking for a possible different way to do the reverse proxy that puts all of the changes into one place and only has the potential to affect someone using it.