| Did you know ... | Search Documentation: |
| http_host.pl -- 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 request 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.
http_public_url(+Request, -URL) is det
http_public_host_url(+Request, -URL) is det
http_public_host(?Request, -Hostname, -Port, +Options) is dettrue (default false), try to replace a local hostname
by a world-wide accessible name.This predicate performs the following steps to find the host and port:
http:public_host and http:public_portX-Forwarded-Host header, which applies if this server
runs behind a proxy.Host header, which applies for HTTP 1.1 if we are
contacted directly.
http_current_host(?Request, -Hostname, -Port, +Options) is det