def METHOD_NAME(response, request):
    if response.content_type != "application/json":
        error_msg = (
            "Service temporary unavailable "
            "due to overloading or maintenance, please retry later."
        )
        response = http_error(response, errno=ERRORS.BACKEND, message=error_msg)
    retry_after = request.registry.settings["retry_after_seconds"]
    response.headers["Retry-After"] = str(retry_after)
    return reapply_cors(request, response)