Allow Cross-Origin requests
This commit is contained in:
parent
55ce880e1e
commit
5eb40b6fd8
2
app.py
2
app.py
|
@ -1,8 +1,10 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from flask import Flask, jsonify, request, render_template
|
from flask import Flask, jsonify, request, render_template
|
||||||
|
from flask_cors import CORS
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
CORS(app)
|
||||||
with open("data.json") as f:
|
with open("data.json") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Flask>=1.1
|
Flask>=1.1
|
||||||
|
flask-cors >= 3.0
|
||||||
|
|
Loading…
Reference in New Issue