Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from munvier/master
Browse files Browse the repository at this point in the history
New way of testing the method of the request
  • Loading branch information
ozee31 authored Aug 14, 2017
2 parents 4cc2d58 + a7f69e8 commit 3e56f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/Middleware/CorsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res
->withHeader('Access-Control-Allow-Credentials', $this->_allowCredentials())
->withHeader('Access-Control-Max-Age', $this->_maxAge());

if ($request->is('options')) {
if (strtoupper($request->getMethod()) === 'OPTIONS') {
$response = $response
->withHeader('Access-Control-Allow-Headers', $this->_allowHeaders($request))
->withHeader('Access-Control-Allow-Methods', $this->_allowMethods())
Expand Down

0 comments on commit 3e56f65

Please sign in to comment.