gpt4 book ai didi

redis - 有没有办法不允许任何人在redis中flushAll?

转载 作者:行者123 更新时间:2023-12-02 13:58:41 26 4
gpt4 key购买 nike

我正在考虑一个实时保存数据的项目,并正在考虑 Redis。我看到的问题是任何人都可以发出命令立即删除所有数据

如何在一切成功持久之前不允许用户发出此类命令。

最佳答案

您可以在配置中使用重命名命令。据redis.conf安全栏目:

# Command renaming.
#
# It is possible to change the name of dangerous commands in a shared
# environment. For instance the CONFIG command may be renamed into something
# hard to guess so that it will still be available for internal-use tools
# but not available for general clients.
#
# Example:
#
# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
#
# It is also possible to completely kill a command by renaming it into
# an empty string:
#
# rename-command CONFIG ""
#
# Please note that changing the name of commands that are logged into the
# AOF file or transmitted to replicas may cause problems.

关于redis - 有没有办法不允许任何人在redis中flushAll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59080953/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com