Package ca.uhn.fhir.rest.server
Class IncomingRequestAddressStrategy
java.lang.Object
ca.uhn.fhir.rest.server.IncomingRequestAddressStrategy
- All Implemented Interfaces:
IServerAddressStrategy
- Direct Known Subclasses:
ApacheProxyAddressStrategy
Determines the server's base using the incoming request
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondetermineServerBase
(jakarta.servlet.ServletContext theServletContext, jakarta.servlet.http.HttpServletRequest theRequest) Determine the server base for a given requestvoid
setServletPath
(String theServletPath) If set to a non-null value (default isnull
), this address strategy assumes that the FHIR endpoint is deployed to the given servlet path within the context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.server.IServerAddressStrategy
determineServletContextPath
-
Constructor Details
-
IncomingRequestAddressStrategy
public IncomingRequestAddressStrategy()
-
-
Method Details
-
determineServerBase
public String determineServerBase(jakarta.servlet.ServletContext theServletContext, jakarta.servlet.http.HttpServletRequest theRequest) Description copied from interface:IServerAddressStrategy
Determine the server base for a given request- Specified by:
determineServerBase
in interfaceIServerAddressStrategy
-
setServletPath
If set to a non-null value (default isnull
), this address strategy assumes that the FHIR endpoint is deployed to the given servlet path within the context. This is useful in some deployments where it isn't obvious to the servlet which part of the path is actually the root path to reach the servlet.Example values could be:
- null
- /
- /base
Wildcards are not supported!
-