Package org.duracloud.common.rest
Class DuraCloudRequestContextFilter
java.lang.Object
org.duracloud.common.rest.DuraCloudRequestContextFilter
- All Implemented Interfaces:
javax.servlet.Filter
This http request filter parses the account id from X-FORWARDED-HOST attribute
and stores it in an http request attribute for use by downstream processes.
It is possible to override the account id by using the
-Dorg.duracloud.accountid system property. You may want to use this override when using
an instance without a DNS name matching the duracloud convention (ie .duracloud.org).
- Author:
- Daniel Bernstein
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DuraCloudRequestContextFilter
public DuraCloudRequestContextFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-