1# initialization
2app = Flask(__name__)
3app.config['SECRET_KEY'] = 'the quick brown fox jumps over the lazy dog'
4app.config['CORS_HEADERS'] = 'Content-Type'
5
6cors = CORS(app, resources={r"/foo": {"origins": "http://localhost:port"}})
7
8@app.route('/foo', methods=['POST'])
9@cross_origin(origin='localhost',headers=['Content- Type','Authorization'])
10def foo():
11 return request.json['inputVar']
12
13if __name__ == '__main__':
14 app.run()
15