将 python Django 与托管在 aws ec2 Ubuntu 上的 apache 服务器一起使用时,支付网关密钥的存储位置
Where to store payment gateway secret key when using python Django with apache server hosted on aws ec2 Ubuntu
在 Apache 服务器上使用 python Django 时,支付网关密钥存储在哪里?
我不知道要在 settings.py 中存储什么,因为我会在我的 git 中检查此文件。
我可以像亚马逊存储 AWS ec2 密钥那样做吗?可以的话怎么做。
您可以在环境变量中设置机密并在 python 代码中获取它们 password = os.getenv('ENVNAME')
。
在 Apache 服务器上使用 python Django 时,支付网关密钥存储在哪里?
我不知道要在 settings.py 中存储什么,因为我会在我的 git 中检查此文件。
我可以像亚马逊存储 AWS ec2 密钥那样做吗?可以的话怎么做。
您可以在环境变量中设置机密并在 python 代码中获取它们 password = os.getenv('ENVNAME')
。