Class XFrameHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.XFrameHandler
-
- All Implemented Interfaces:
Handler<RoutingContext>
,SecurityPolicyHandler
public class XFrameHandler extends Object implements SecurityPolicyHandler, Handler<RoutingContext>
The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a,
,
or
. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites. The added security is provided only if the user accessing the document is using a browser that supports
X-Frame-Options
.NOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<XFrameHandler>
__TYPE_ARG
static String
DENY
The page cannot be displayed in a frame, regardless of the site attempting to do so.static String
SAMEORIGIN
The page can only be displayed in a frame on the same origin as the page itself.
-
Constructor Summary
Constructors Constructor Description XFrameHandler(XFrameHandler delegate)
XFrameHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XFrameHandler
create(String action)
Creates a new handler that will add theX-FRAME-OPTIONS
header to the current response.boolean
equals(Object o)
XFrameHandler
getDelegate()
void
handle(RoutingContext event)
Something has happened, so handle it.int
hashCode()
static XFrameHandler
newInstance(XFrameHandler arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<XFrameHandler> __TYPE_ARG
-
DENY
public static final String DENY
The page cannot be displayed in a frame, regardless of the site attempting to do so.- See Also:
- Constant Field Values
-
SAMEORIGIN
public static final String SAMEORIGIN
The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XFrameHandler
public XFrameHandler(XFrameHandler delegate)
-
XFrameHandler
public XFrameHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public XFrameHandler getDelegate()
- Specified by:
getDelegate
in interfaceSecurityPolicyHandler
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handle
in interfaceHandler<RoutingContext>
- Specified by:
handle
in interfaceSecurityPolicyHandler
- Parameters:
event
- the event to handle
-
create
public static XFrameHandler create(String action)
Creates a new handler that will add theX-FRAME-OPTIONS
header to the current response.- Parameters:
action
- a string value eitherDENY
orSAMEORIGIN
.- Returns:
- the handler
-
newInstance
public static XFrameHandler newInstance(XFrameHandler arg)
-
-