Page Contents

Home > @loopback/rest > RequestContext > requestedBaseUrl

RequestContext.requestedBaseUrl property

Get the base URL used by the client to make the request. This URL contains the protocol, hostname, port and base path. The path of the invoked route and query string is not included.

Please note these values may be different from what we are observing at HTTP/TCP level, because reverse proxies like nginx are rewriting them.

Signature:

readonly requestedBaseUrl: string;