Commit 9cf88c79 authored by Romain Loth's avatar Romain Loth

mini server kept locally + remove cors accordingly (safergit status)

parent e4d250f0
......@@ -21,7 +21,7 @@ var TW = {}
// // "data/example.json",
// // "data/Elisa__Omodei.gexf",
];
TW.APINAME = "http://127.0.0.1:5000/twitter_search";
TW.APINAME = "http://134.158.75.71/twitter_search";
TW.tagcloud_limit = 50;
TW.bridge={};
TW.bridge["forFilteredQuery"] = "php/bridgeClientServer_filter.php";
......
python-twitter
flask-cors
#flask-cors
......@@ -17,8 +17,8 @@ import twitter
from flask.ext.cors import CORS, cross_origin
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
#cors = CORS(app)
#app.config['CORS_HEADERS'] = 'Content-Type'
# ---- initialize twitter api with credentials ----
keys_file = open("keys.json")
......@@ -37,7 +37,7 @@ QCONTEXT = "(Fillon OR Macron OR JLM2017 OR Mélenchon OR #Marine2017 OR @MLP_of
@app.route('/twitter_search')
# @cross_origin(origin="twjs.org")
@cross_origin()
#@cross_origin()
def searcher():
if 'query' in request.args:
# prepare query
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment