def METHOD_NAME(fun):
    @wraps(fun)
    def wrapper(*args, **kwargs):
        if not development and not request.is_secure:
            return generate_upgrade_request()
        return fun(*args, **kwargs)
    return wrappe