File tree Expand file tree Collapse file tree 6 files changed +8
-9
lines changed
lib/internal/Magento/Framework/App Expand file tree Collapse file tree 6 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 296
296
</argument >
297
297
</arguments >
298
298
</type >
299
- <type name =" Magento\Framework\App\Response\Http" >
300
- <plugin name =" xFrameOptionsHeader" type =" Magento\Framework\App\Response\XFrameOptPlugin" />
301
- </type >
302
-
303
299
</config >
Original file line number Diff line number Diff line change 136
136
<preference for =" Magento\Framework\Api\ImageContentValidatorInterface" type =" Magento\Framework\Api\ImageContentValidator" />
137
137
<preference for =" Magento\Framework\Api\ImageProcessorInterface" type =" Magento\Framework\Api\ImageProcessor" />
138
138
<preference for =" Magento\Framework\Code\Reader\ClassReaderInterface" type =" Magento\Framework\Code\Reader\ClassReader" />
139
+ <type name =" Magento\Framework\App\Response\Http" >
140
+ <plugin name =" xFrameOptionsHeader" type =" Magento\Framework\App\Response\XFrameOptPlugin" />
141
+ </type >
139
142
<type name =" Magento\Framework\App\Response\XFrameOptPlugin" >
140
143
<arguments >
141
144
<argument name =" xFrameOpt" xsi : type =" init_parameter" >Magento\Framework\App\Response\XFrameOptPlugin::DEPLOYMENT_CONFIG_X_FRAME_OPT</argument >
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ class XFrameOptPlugin
14
14
/** Deployment config key for frontend x-frame-options header value */
15
15
const DEPLOYMENT_CONFIG_X_FRAME_OPT = 'x-frame-options ' ;
16
16
17
- /** Always send DENY in backend x-frame-options header */
18
- const BACKEND_X_FRAME_OPT = 'DENY ' ;
17
+ /** Always send SAMEORIGIN in backend x-frame-options header */
18
+ const BACKEND_X_FRAME_OPT = 'SAMEORIGIN ' ;
19
19
20
20
/**
21
21
*The header value
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ public function testWakeUpWith()
274
274
275
275
public function testSetXFrameOptions ()
276
276
{
277
- $ value = 'SAMEORIGIN ' ;
277
+ $ value = 'DENY ' ;
278
278
$ this ->model ->setXFrameOptions ($ value );
279
279
$ this ->assertSame ($ value , $ this ->model ->getHeader (Http::HEADER_X_FRAME_OPT )->getFieldValue ());
280
280
}
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ public function createXFrameConfig()
220
220
{
221
221
$ configData = new ConfigData (ConfigFilePool::APP_ENV );
222
222
if ($ this ->deploymentConfig ->get (ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT ) === null ) {
223
- $ configData ->set (ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT , 'DENY ' );
223
+ $ configData ->set (ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT , 'SAMEORIGIN ' );
224
224
}
225
225
return $ configData ;
226
226
}
Original file line number Diff line number Diff line change @@ -36,6 +36,6 @@ public function testCreateXFrameConfig()
36
36
->with (ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT )
37
37
->willReturn (null );
38
38
$ configData = $ this ->model ->createXFrameConfig ();
39
- $ this ->assertSame ('DENY ' , $ configData ->getData ()[ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT ]);
39
+ $ this ->assertSame ('SAMEORIGIN ' , $ configData ->getData ()[ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT ]);
40
40
}
41
41
}
You can’t perform that action at this time.
0 commit comments