def need_update(): if is_valid_origin(request.referrer): response = make_response(jsonify({"version": PROTOCOL_VERSION})) response.headers['Content-Type'] = 'application/json' return response else: return answers_with_403()
def font_files(): if is_valid_origin(request.referrer): response = make_response( jsonify({ "version": PROTOCOL_VERSION, "fontFiles": FONT_FILES })) response.headers['Content-Type'] = 'application/json' return response else: return answers_with_403()
def need_update(): if is_valid_origin(request.referrer): response = make_response(jsonify({"version": PROTOCOL_VERSION})) if request.referrer: response.headers['Access-Control-Allow-Origin'] = \ request.referrer[:-1] if request.referrer.endswith("/") else \ request.referrer[:-1] response.headers['Content-Type'] = 'application/json' return response else: return answers_with_404()