public class XFrameHandler extends Object implements SecurityPolicyHandler, Handler<RoutingContext>
,
,
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.Modifier and Type | Field and 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 and Description |
---|
XFrameHandler(Object delegate) |
XFrameHandler(XFrameHandler delegate) |
Modifier and Type | Method and Description |
---|---|
static XFrameHandler |
create(String action)
Creates a new handler that will add the
X-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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<XFrameHandler> __TYPE_ARG
public static final String DENY
public static final String SAMEORIGIN
public XFrameHandler(XFrameHandler delegate)
public XFrameHandler(Object delegate)
public XFrameHandler getDelegate()
getDelegate
in interface SecurityPolicyHandler
public void handle(RoutingContext event)
handle
in interface Handler<RoutingContext>
handle
in interface SecurityPolicyHandler
event
- the event to handlepublic static XFrameHandler create(String action)
X-FRAME-OPTIONS
header to the current response.action
- a string value either DENY
or SAMEORIGIN
.public static XFrameHandler newInstance(XFrameHandler arg)
Copyright © 2024 Eclipse. All rights reserved.