Ejemplo n.º 1
0
def ajax_version():
    if validate_csrf(request.headers.get(CSRF_TOKEN_H, None)):
        # Cache the version for two days, hard for it to change that often.
        return backend.ajax_get(
            request,
            app_conf_get("VERSION_API_ENDPOINT"),
            timeout=60*60*24*2)
    else:
        abort(400)
Ejemplo n.º 2
0
def ajax_boot():
    if validate_csrf(request.headers.get(CSRF_TOKEN_H, None)):
        return backend.ajax_get(request, app_conf_get("BOOT_API_ENDPOINT"))
    else:
        abort(400)