SpaceApi-archive / endpoint-hosting

Easily create a new endpoint in one minute!
http://spaceapi.net/new
0 stars 0 forks source link

Port number missing in /status or /status/json links #3

Closed slopjong closed 10 years ago

slopjong commented 10 years ago

The endpoint links have no port number set. See the screenshots.

2014-03-31-233342_352x284_scrot 2014-03-31-233413_493x22_scrot

I wrote the view helper ...

function port($value)
{
    $port = intval($_SERVER['REMOTE_PORT']);
    if ($port !== 80) {
        $value += ":$port";
    }
    return $value;
}

... which I expect to append the port number used by the client. The port number is important for dev environments with a nat/pat between the client and the server (as I do at the moment). The URL, however, looks odd aferwards.

http://endpoint.spaceapi.net:8090/endpoint/0/space/gasdfasdfasdf/status/json