Fix port mismatch when used behind a reverse proxy

I tried using Subway on a Dokku instance and since it uses a reverse proxy to map port 80 to the port Subway uses, the generated script was using the internal port and causing subway to stop working. This patch solves the problem by simply using the same port where the document is loaded.