diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2015-02-18 10:27:29 -0500 |
---|---|---|
committer | Clark Tomlinson <fallen013@gmail.com> | 2015-02-18 10:27:29 -0500 |
commit | 8d09cc3b91a9689a6c95e06c8002288bdd8d5bbf (patch) | |
tree | 81e09b101401476c2de80460a994a34ff26b75d8 /tests/lib/appframework/controller/ControllerTest.php | |
parent | 84cc90a0ee81d32001ccaa38795cbcf4343ac2f0 (diff) | |
parent | a9d1a0144018e60ba2728708bf965b4d9855920b (diff) | |
download | nextcloud-server-8d09cc3b91a9689a6c95e06c8002288bdd8d5bbf.tar.gz nextcloud-server-8d09cc3b91a9689a6c95e06c8002288bdd8d5bbf.zip |
Merge pull request #13989 from owncloud/enhancment/security/11857
Allow AppFramework applications to specify a custom CSP header
Diffstat (limited to 'tests/lib/appframework/controller/ControllerTest.php')
-rw-r--r-- | tests/lib/appframework/controller/ControllerTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/appframework/controller/ControllerTest.php b/tests/lib/appframework/controller/ControllerTest.php index 78c0d9d15a1..ccc373f4d59 100644 --- a/tests/lib/appframework/controller/ControllerTest.php +++ b/tests/lib/appframework/controller/ControllerTest.php @@ -173,11 +173,12 @@ class ControllerTest extends \Test\TestCase { public function testFormatDataResponseJSON() { - $expectedHeaders = array( + $expectedHeaders = [ 'test' => 'something', 'Cache-Control' => 'no-cache, must-revalidate', - 'Content-Type' => 'application/json; charset=utf-8' - ); + 'Content-Type' => 'application/json; charset=utf-8', + 'Content-Security-Policy' => "default-src 'none';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self';font-src 'self';connect-src 'self';media-src 'self'", + ]; $response = $this->controller->customDataResponse(array('hi')); $response = $this->controller->buildResponse($response, 'json'); |