The gateway URL was needed due to how we used the Apache phases, but with Plack it isn't needed. If WebGUI is mounted on a sub-url, Plack::Request will give you a URI object for the full base URI in $request->base. That should be able to be used to calculate the URLs to generate, and any gateway processing for incoming URLs could just be removed.