3.11 Library http/http_host -- Obtain public server location
This library finds the public address of the running server. This can
be used to construct URLs that are visible from anywhere on the
internet. This module was introduced to deal with OpenID, where a reques
is redirected to the OpenID server, which in turn redirects to our
server (see http_openid.pl).
The address is established from the settings http:public_host and http:public_port if provided. Otherwise it is deduced from the request.
- [det]http_current_host(+Request, -Hostname, -Port, Options)
- Current global host and port of the HTTP server. This is the basis to
form absolute address, which we need for redirection based interaction
such as the OpenID protocol. Options are:
- global(+Bool)
- If
true(defaultfalse), try to replace a local hostname by a world-wide accessible name.