public class XContentTypeOptionsValve extends ValveBase
This Valve is designed to add an
X-Content-Type-Options : nosniff header to the Response
object.
This is configured in the context.xml, or server.xml file using the following syntax:
<valve> <class-name>com.bluelotussoftware.tomcat.security.valves.XContentTypeOptionsValve</class-name> </valve>
Lifecycle.SingleUseasyncSupported, container, containerLog, next, smmserverAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
XContentTypeOptionsValve() |
| Modifier and Type | Method and Description |
|---|---|
void |
invoke(Request request,
Response response) |
backgroundProcess, getContainer, getDomainInternal, getNext, getObjectNameKeyProperties, initInternal, isAsyncSupported, setAsyncSupported, setContainer, setNext, startInternal, stopInternal, toStringdestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stoppublic XContentTypeOptionsValve()
public void invoke(Request request, Response response) throws IOException, javax.servlet.ServletException
Adds X-Content-Type-Options : nosniff header to the
Response object.
IOExceptionjavax.servlet.ServletExceptionCopyright © 2017–2018 Blue Lotus Software, LLC.. All rights reserved.