public class CorsInterceptor extends InterceptorAdapter
IServerInterceptor.ActionRequestDetails| Constructor and Description |
|---|
CorsInterceptor()
Constructor which creates an interceptor with default CORS configuration for use in
a FHIR server.
|
CorsInterceptor(org.springframework.web.cors.CorsConfiguration theConfiguration)
Constructor which accepts the given configuration
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.cors.CorsConfiguration |
getConfig()
Gets the CORS configuration
|
boolean |
incomingRequestPreProcessed(javax.servlet.http.HttpServletRequest theRequest,
javax.servlet.http.HttpServletResponse theResponse)
This method is called before any other processing takes place for each incoming request.
|
void |
setConfig(org.springframework.web.cors.CorsConfiguration theConfiguration)
Sets the CORS configuration
|
handleException, incomingRequestPostProcessed, incomingRequestPreHandled, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, outgoingResponse, preProcessOutgoingException, processingCompletedNormallypublic CorsInterceptor()
public CorsInterceptor(org.springframework.web.cors.CorsConfiguration theConfiguration)
theConfiguration - The CORS configurationpublic void setConfig(org.springframework.web.cors.CorsConfiguration theConfiguration)
public org.springframework.web.cors.CorsConfiguration getConfig()
public boolean incomingRequestPreProcessed(javax.servlet.http.HttpServletRequest theRequest, javax.servlet.http.HttpServletResponse theResponse)
IServerInterceptorNote that any exceptions thrown by this method will not be trapped by HAPI (they will be passed up to the server)
incomingRequestPreProcessed in interface IServerInterceptorincomingRequestPreProcessed in class InterceptorAdaptertheRequest - The incoming requesttheResponse - The response. Note that interceptors may choose to provide a response (i.e. by calling
ServletResponse.getWriter()) but in that case it is important to return false
to indicate that the server itself should not also provide a response.true if processing should continue normally. This is generally the right thing to do.
If your interceptor is providing a response rather than letting HAPI handle the response normally, you
must return false. In this case, no further processing will occur and no further interceptors
will be called.Copyright © 2014–2017 University Health Network. All rights reserved.