Class XFrameHandler
java.lang.Object
io.vertx.reactivex.ext.web.handler.XFrameHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate, SecurityPolicyHandler
public class XFrameHandler
extends Object
implements io.vertx.lang.rx.RxDelegate, 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
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<XFrameHandler> static final StringThe page cannot be displayed in a frame, regardless of the site attempting to do so.static final StringThe page can only be displayed in a frame on the same origin as the page itself. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XFrameHandlerCreates a new handler that will add theX-FRAME-OPTIONSheader to the current response.booleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static XFrameHandlernewInstance(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
-
XFrameHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Specified by:
getDelegatein interfaceSecurityPolicyHandler
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Specified by:
handlein interfaceSecurityPolicyHandler- Parameters:
event- the event to handle
-
create
Creates a new handler that will add theX-FRAME-OPTIONSheader to the current response.- Parameters:
action- a string value eitherDENYorSAMEORIGIN.- Returns:
- the handler
-
newInstance
-