Skip to content
Permalink
Browse files

CodeStyle fixes

  • Loading branch information...
ravage84 committed Oct 21, 2018
1 parent e20b183 commit ec711f5b99384897f594c03a41c6ceae21f063f4
Showing with 12 additions and 7 deletions.
  1. +12 −7 src/Http/Middleware/SecurityHeadersMiddleware.php
@@ -130,8 +130,8 @@ public function noOpen()
* Referrer-Policy
*
* @link https://w3c.github.io/webappsec-referrer-policy
* @param string $policy Policy value. Available Value: 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin',
* 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'
* @param string $policy Policy value. Available Value: 'no-referrer', 'no-referrer-when-downgrade', 'origin',
* 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'
* @return $this
*/
public function setReferrerPolicy($policy = self::SAME_ORIGIN)
@@ -144,7 +144,7 @@ public function setReferrerPolicy($policy = self::SAME_ORIGIN)
self::SAME_ORIGIN,
self::STRICT_ORIGIN,
self::STRICT_ORIGIN_WHEN_CROSS_ORIGIN,
self::UNSAFE_URL
self::UNSAFE_URL,
];
$this->checkValues($policy, $available);
@@ -202,14 +202,19 @@ public function setXssProtection($mode = self::XSS_BLOCK)
* X-Permitted-Cross-Domain-Policies
*
* @link https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
* @param string $policy Policy value. Available Values: 'all', 'none', 'master-only', 'by-content-type', 'by-ftp-filename'
* @param string $policy Policy value. Available Values: 'all', 'none', 'master-only', 'by-content-type',
* 'by-ftp-filename'
* @return $this
*/
public function setCrossDomainPolicy($policy = self::ALL)
{
$this->checkValues($policy,
[self::ALL, self::NONE, self::MASTER_ONLY, self::BY_CONTENT_TYPE, self::BY_FTP_FILENAME]
);
$this->checkValues($policy, [
self::ALL,
self::NONE,
self::MASTER_ONLY,
self::BY_CONTENT_TYPE,
self::BY_FTP_FILENAME,
]);
$this->headers['x-permitted-cross-domain-policies'] = $policy;
return $this;

0 comments on commit ec711f5

Please sign in to comment.
You can’t perform that action at this time.