Yes, essentially the interceptor sets the base URL in the event object at the beginning of each request. Then build link automatically uses that. That way the value is set for each request based on the current cgi variable.
This interceptor is essentially the same thing that I came up with to solve this issue however now I have an onRequestCapture interceptor which I am using to perform some redirects (want to be as close to the beginning of the request as possible) and the baseUrl has not yet been updated for the request. Is there any particular reason you chose to perform this intercept preProcess instead of onRequestCapture? I just want to make sure I am not going to run into unforeseen issues. Or maybe I am doing my redirects incorrectly. We want the redirects to be as fast as possible (super low latency).