Swagger UI through port redirect

I have an application that I deploy on Linux / Apache2 (XData 5.3 Aurelius 5.6)
In my local environment it works fine for me, however I have posted on a port other than 80 and am getting the following error

Yes, the problem is that XData thinks your server is in port 80, that's why it provides the Swagger UI trying to get the json from port 80.

You can use Forward middleware (if your router provides the correct headers), or use OnGetAbsoluteUrl event to mannually provide the correct "public" URL for your Swagger endpoint.

More information here: