Package io.vertx.mutiny.ext.web.handler
Class XFrameHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.XFrameHandler
- All Implemented Interfaces:
MutinyDelegate
,io.vertx.core.Handler<RoutingContext>
,SecurityPolicyHandler
,Consumer<RoutingContext>
public class XFrameHandler
extends Object
implements MutinyDelegate, SecurityPolicyHandler, io.vertx.core.Handler<RoutingContext>, Consumer<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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<XFrameHandler>
static final String
The page cannot be displayed in a frame, regardless of the site attempting to do so.static final String
The page can only be displayed in a frame on the same origin as the page itself. -
Constructor Summary
ConstructorsConstructorDescriptionXFrameHandler
(io.vertx.ext.web.handler.XFrameHandler delegate) XFrameHandler
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(RoutingContext item) static XFrameHandler
boolean
io.vertx.ext.web.handler.XFrameHandler
void
handle
(RoutingContext arg0) int
hashCode()
static XFrameHandler
newInstance
(io.vertx.ext.web.handler.XFrameHandler arg) toString()
-
Field Details
-
__TYPE_ARG
-
DENY
The page cannot be displayed in a frame, regardless of the site attempting to do so.- See Also:
-
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:
-
-
Constructor Details
-
XFrameHandler
public XFrameHandler(io.vertx.ext.web.handler.XFrameHandler delegate) -
XFrameHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.XFrameHandler getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Specified by:
getDelegate
in interfaceSecurityPolicyHandler
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
- Specified by:
handle
in interfaceSecurityPolicyHandler
-
create
- Parameters:
action
- a string value eitherDENY
orSAMEORIGIN
.- Returns:
- the handler
-
accept
- Specified by:
accept
in interfaceConsumer<RoutingContext>
- Specified by:
accept
in interfaceSecurityPolicyHandler
-
newInstance
-