From f2d5ddb5a821c994e893b911640d70cc48054bec Mon Sep 17 00:00:00 2001 From: Derek Covey Date: Tue, 24 Jul 2018 12:30:10 -0700 Subject: [PATCH] Enable Cross-Origin Resource Sharing (CORS) --- app.py | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/app.py b/app.py index 8612a2b..a89c44b 100644 --- a/app.py +++ b/app.py @@ -1,9 +1,11 @@ import os from flask import Flask, request, render_template, send_from_directory +from flask_cors import CORS import iss from util import safe_float, json, jsonp app = Flask(__name__) +CORS(app) # APIs: API_DEFS = [ diff --git a/requirements.txt b/requirements.txt index 09f1ccd..669cb80 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ newrelic==2.66.0.49 pyephem==3.7.6.0 redis==2.10.5 Werkzeug==0.11.10 +Flask-Cors==3.0.6 \ No newline at end of file