Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Aug 4, 2018
1 parent 2033dbb commit 9093cb6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ Array with the available charsets, to negotiate with the `Accept-Charset` header

Adds the `X-Content-Type-Options: nosniff` header, to mitigating [MIME confusión attacks.](https://blog.mozilla.org/security/2016/08/26/mitigating-mime-confusion-attacks-in-firefox/). `true` by default. To disable it: `noSniff(false)`.

#### `responseFactory(Psr\Http\Message\ResponseFactoryInterface $responseFactory)`

A PSR-17 factory to create `406` responses.

```php
$request = (new ServerRequest())
->withHeader('Accept', 'application/xml;charset=UTF-8,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8');
Expand Down Expand Up @@ -158,6 +162,9 @@ echo $response->getBody(); //Hello world

Used to return a `302` response redirecting to a path containing the language. This only works if `usePath` is enabled, so for example, if the request uri is `/welcome`, returns a redirection to `/en/welcome`.

#### `responseFactory(Psr\Http\Message\ResponseFactoryInterface $responseFactory)`

A PSR-17 factory to create redirect responses.

## ContentEncoding

Expand Down

0 comments on commit 9093cb6

Please sign in to comment.