My server code looks like (running on localhost:5000):
import os
from flask import Flask
from flask_graphql import GraphQLView
from flask_cors import CORS
from .graphql import schema
app = Flask(__name__)
CORS(app)
@app.route("/")
def home():
return "Hello World"
if __name__ == "__main__":
app.run(debug=True)
I'm making the follow request from my client (running on localhost:3000):
My server code looks like (running on
localhost:5000
):I'm making the follow request from my client (running on
localhost:3000
):I get the following error in the dev console on Chrome:
Is the
/options
route something that I need to implement for my Flask app? Looks like the browser makes a preflight request:[https://ibb.co/vsqB23x](Preflight request) [https://ibb.co/j60Kb3f](Post request)