Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Attributes
XFrameOptions Class Reference
Inheritance diagram for XFrameOptions:
AbstractHeaderProvider HeaderProviderInterface

Public Member Functions

 __construct ($xFrameOpt='SAMEORIGIN')
 
- Public Member Functions inherited from AbstractHeaderProvider
 canApply ()
 
 getName ()
 
 getValue ()
 

Data Fields

const DEPLOYMENT_CONFIG_X_FRAME_OPT = 'x-frame-options'
 
const BACKEND_X_FRAME_OPT = 'SAMEORIGIN'
 

Protected Attributes

 $headerName = Http::HEADER_X_FRAME_OPT
 
 $headerValue
 
- Protected Attributes inherited from AbstractHeaderProvider
 $headerName = ''
 
 $headerValue = ''
 

Detailed Description

Adds an X-FRAME-OPTIONS header to HTTP responses to safeguard against click-jacking.

Definition at line 13 of file XFrameOptions.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $xFrameOpt = 'SAMEORIGIN')
Parameters
string$xFrameOpt

Definition at line 38 of file XFrameOptions.php.

39  {
40  $this->headerValue = $xFrameOpt;
41  }

Field Documentation

◆ $headerName

$headerName = Http::HEADER_X_FRAME_OPT
protected

Definition at line 26 of file XFrameOptions.php.

◆ $headerValue

$headerValue
protected

Definition at line 33 of file XFrameOptions.php.

◆ BACKEND_X_FRAME_OPT

const BACKEND_X_FRAME_OPT = 'SAMEORIGIN'

Always send SAMEORIGIN in backend x-frame-options header

Definition at line 19 of file XFrameOptions.php.

◆ DEPLOYMENT_CONFIG_X_FRAME_OPT

const DEPLOYMENT_CONFIG_X_FRAME_OPT = 'x-frame-options'

Deployment config key for frontend x-frame-options header value

Definition at line 16 of file XFrameOptions.php.


The documentation for this class was generated from the following file: