Created
October 26, 2011 13:25
-
-
Save jgeraerts/1316339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SSLFIlter implements Filter { | |
@Override | |
public void init(FilterConfig filterConfig) throws ServletException { | |
} | |
@Override | |
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { | |
filterChain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) servletRequest){ | |
@Override | |
public boolean isSecure() { | |
return ((HttpServletRequest) servletRequest).getHeader("X-SSL-WHATEVER") != null); | |
} | |
},servletResponse); | |
} | |
@Override | |
public void destroy() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment