title: Flask-cors wrapper not working when jwt auth wrapper is applied.
body: <p>I'm trying to build a api site using Flask, and I am using <code>Flask-jwt</code> to provide token authorization.<br>
  The authorizaiton works fine if I do CORS in Apache ( using mod_headers to add Allow-Access headers, like this  </p>
  
  <p><code>Header set Access-Control-Allow-Origin "*"
  </code></p>
  
  <p>However, I want to have more detailed access control instead of just using wildcard.  and I looked at <code>flask-cors</code>, which is a nice wrapper to check origin and send the header. 
  And now my route looks like this (and no header manipulation in apache settings)</p>
  
  <pre><code>@app.route('/protected/place')
  @cross_origin(headers=['Content-Type']) # Send Access-Control-Allow-Headers
  @jwt_required()
  def my_view_func():
      do something
  </code></pre>
  
  <p>But now I will not get the Access-Control headers response from the server if I make the http request from javascript. (However, if I manually post, like doing curl, i can still see the cross origin plugin working and the Access control headers)</p>
  
  <p>When I remove the <code>@jwt_required</code> wrapper, the cross_origin wrapper functions fine and it will give me response. 
  when the jwt_required wrapper is applied, no response can be seen from the server.</p>
  
  <p>I'm debugging my client page with chrome. BTW</p>
  
  <p>I tried to change the order of the wrappers, but it doesn't help.</p>
  
  <p>Is it possible that, if the authentication fails, the cross_origin wrapper will not send the Access Control headers?</p>
  
  <p>the source code of the two wrappers :<br>
  flask-jwt:<br>
  <a href="https://github.com/mattupstate/flask-jwt/blob/master/flask_jwt/__init__.py" rel="noreferrer">https://github.com/mattupstate/flask-jwt/blob/master/flask_jwt/<strong>init</strong>.py</a><br>
  flask-cors:<br>
  <a href="https://github.com/wcdolphin/flask-cors/blob/master/flask_cors.py" rel="noreferrer">https://github.com/wcdolphin/flask-cors/blob/master/flask_cors.py</a></p>