Does this fix cors?

This commit is contained in:
Robbe Van Herck 2020-05-13 18:37:15 +02:00
parent edf09757ae
commit 2feeaa10ec

View file

@ -25,8 +25,8 @@ RANGE_NAME = CONFIG["Google"]["RANGE_NAME"]
CACHE_TIMEOUT = int(CONFIG["Cache"]["TIMEOUT"]) CACHE_TIMEOUT = int(CONFIG["Cache"]["TIMEOUT"])
@app.route('/data.json') @app.route('/data.json')
@cross_origin()
@cache.cached(timeout=CACHE_TIMEOUT) @cache.cached(timeout=CACHE_TIMEOUT)
@cross_origin()
def data_json(): def data_json():
return google_sheet_to_json(SPREADSHEET_ID, RANGE_NAME) return google_sheet_to_json(SPREADSHEET_ID, RANGE_NAME)