fix(CORS) CORS ERROR on Heroku
The Heroku deployment experienced the following error. ```No 'Access-Control-Allow-Origin' header is present on the requested resource. ```
This commit is contained in:
parent
43ec7e5ca8
commit
e0c9aaa5ce
1 changed files with 2 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ from collections import Counter
|
|||
from flask import Flask
|
||||
from flask import request, render_template, make_response, jsonify, Blueprint, url_for
|
||||
from flask_restplus import Resource, Api, fields, reqparse
|
||||
from flask_cors import CORS, cross_origin
|
||||
import settings
|
||||
import etl
|
||||
import palettes as pal
|
||||
|
|
@ -22,6 +23,7 @@ from iplotter import C3Plotter
|
|||
c3 = C3Plotter()
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
api_blueprint = Blueprint('api', __name__, url_prefix='/api')
|
||||
api = Api(api_blueprint, title='pyDataVizday api',
|
||||
description='This api is used for the pyDataVizDay visualization',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue