title: CORS issue in lumen for POST
body: <p>My lumen middleware has the following code</p>
  
  <pre><code>public function handle($request, Closure $next)
  {
      //Intercepts OPTIONS requests
      if($request-&gt;isMethod('OPTIONS')) {
          $response = response('', 200);
      } else {
          // Pass the request to the next middleware
          $response = $next($request);
      }
  
      // Adds headers to the response
      $response-&gt;header('Access-Control-Allow-Methods', 'HEAD, GET, POST, PUT, PATCH, DELETE');
      $response-&gt;header('Access-Control-Allow-Headers', $request-&gt;header('Access-Control-Request-Headers'));
      $response-&gt;header('Access-Control-Allow-Origin', '*');
  
      // Sends it
      return $response;
  }
  </code></pre>
  
  <p>I can use postman to send requests and it is getting response too. When I send a post request through vue.js http method, Cross-Origin Request Blocked error is showing. </p>