Skip to content

Commit

Permalink
Cleaning up the doc blocks for the SecurityMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum committed Apr 4, 2017
1 parent ba8bfe5 commit ba52753
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions src/Routing/Middleware/SecurityMiddleware.php
Expand Up @@ -34,10 +34,9 @@ class SecurityMiddleware
/**
* X-Content-Type-Options
*
* Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
*
* Available Value: 'nosniff'
* Sets the header value for it to 'nosniff'
*
* @link Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
* @return $this
*/
public function noSniff()
Expand All @@ -50,10 +49,9 @@ public function noSniff()
/**
* X-Download-Options
*
* Reference: https://msdn.microsoft.com/en-us/library/jj542450(v=vs.85).aspx
*
* Available Value: 'noopen'
* Sets the header value for it to 'noopen'
*
* @link https://msdn.microsoft.com/en-us/library/jj542450(v=vs.85).aspx
* @return $this
*/
public function noOpen()
Expand All @@ -66,12 +64,9 @@ public function noOpen()
/**
* Referrer-Policy
*
* Reference: https://w3c.github.io/webappsec-referrer-policy
*
* 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
* @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'
* @return $this
*/
public function setReferrerPolicy($policy = 'same-origin')
Expand All @@ -92,11 +87,8 @@ public function setReferrerPolicy($policy = 'same-origin')
/**
* X-Frame-Options
*
* Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
*
* Available Value: 'deny', 'sameorigin', 'allow-from <uri>'
*
* @param string $option Option value
* @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
* @param string $option Option value. Available Values: 'deny', 'sameorigin', 'allow-from <uri>'
* @param string $url URL if mode is `allow-from`
* @return $this
*/
Expand All @@ -119,11 +111,8 @@ public function setXFrameOptions($option = 'sameorigin', $url = null)
/**
* X-XSS-Protection
*
* Reference: https://blogs.msdn.microsoft.com/ieinternals/2011/01/31/controlling-the-xss-filter
*
* Available Value: '1', '0', '1; mode=block'
*
* @param string $mode Mode value
* @link https://blogs.msdn.microsoft.com/ieinternals/2011/01/31/controlling-the-xss-filter
* @param string $mode Mode value. Available Values: '1', '0', 'block'
* @return $this
*/
public function setXssProtection($mode = 'block')
Expand All @@ -143,11 +132,8 @@ public function setXssProtection($mode = 'block')
/**
* X-Permitted-Cross-Domain-Policies
*
* Reference: https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
*
* Available Value: 'all', 'none', 'master-only', 'by-content-type', 'by-ftp-filename'
*
* @param string $policy Policy value
* @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'
* @return $this
*/
public function setCrossDomainPolicy($policy = 'all')
Expand Down

0 comments on commit ba52753

Please sign in to comment.