Skip to main content

HS.FHIRServer.Util.BaseURL

abstract class HS.FHIRServer.Util.BaseURL

Default approach to getting the base URL from a FHIR/CSP request. Use HS.Local.FHIRServer.Util.BaseURL to make any customizations

Method Inventory

Methods

classmethod GetBaseURL(pRequest As %RegisteredObject = $$$NULLOREF, Output pLocalBase As %String) as %String
@API.Method
@API.Overrideable
Method for determining the user-visible base URL from a request object pRequest.
The return value is this user-visible base URL.
The optional second parameter pLocalBase returns the "local" base URL to be used internally.
Default implementation details:
- The specification for the standard FORWARDED header is at https://www.rfc-editor.org/rfc/rfc7239.
- If the FORWARDED header is present, then its contents are used for scheme, host and port:
- - If "proto" is present, then it is used for the url scheme (http/https).
- - If "host" is present, then it is used for the host name and port number.
- - The "for" and "by" parameters are not used by the default implementation of this method.
- Otherwise:
- - If X-FORWARDED-PROTO is present, then it is used for the url scheme (http/https).
- - If X-FORWARDED-HOST is present, then it is used for the host name and port number. Port number here can be overridden by X-FORWARDED-PORT.
- - If X-FORWARDED-PORT is present, then it is used for the port, and overrides port value from X-FORWARDED-HOST.
- Checking and use of X-FORWARDED-PREFIX is independent of whether FORWARDED is present:
- - If X-FORWARDED-PREFIX is present, then it is used for the part of the base that comes after host and port.

Subclasses

FeedbackOpens in a new tab