title: fetch always pass with OPTIONS method
body: <p>I made API server with flask-restplus.</p>
  
  <p>Also use cors module for avoid CSP issue.</p>
  
  <p>And frontend is React.js.</p>
  
  <p>My code is here.</p>
  
  <pre><code>class ArticleList(Resource):
      def post(self):
          print(1)
          return {"status":"true", "result":"article write success"}, 200
  </code></pre>
  
  <p>React.js code is here.</p>
  
  <pre><code>_writeArticle = () =&gt; {
      const { title, body, tags, password } = this.state;
      const data = {title: title, body: body, tags: tags, password: password};
      fetch("http://127.0.0.1:5000/article/", {
          method: "POST",
          mode: "cors",
          headers: {
              "Content-Type": "application/json"
          },
          body: data
      })
      .then(res =&gt; {
          if(res.status === 200) {
              return &lt;Redirect to='/' /&gt;
          } else {
              alert("error");
          }
      })
      .catch(err =&gt; console.log(err))
  }
  </code></pre>
  
  <p>I defined method to <code>POST</code>. But, it request with <code>OPTIONS</code> method.</p>
  
  <p>After searched in google, that issue cause by CORS.</p>
  
  <p>So I defined cors to main code like this.</p>
  
  <pre><code>from flask import Flask
  from flask_restplus import Api, Resource
  from api.board import ArticleList, Article
  from flask_restplus import cors
  
  app = Flask(__name__)
  api = Api(app)
  api.decorators=[cors.crossdomain(origin='*')]
  
  api.add_resource(ArticleList, '/article')
  api.add_resource(Article, '/article/&lt;int:article_no&gt;')
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  
  <p>But it still request with <code>OPTIONS</code>.</p>
  
  <p>How can I solve this issue?</p>