In the old version of Swagger (.Net framework) I\'ve used this function to change the URL:
RootUrl(req => ComputeHostAsSeenByOriginalClient(req))