简体   繁体   English

将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

Where to store payment gateway secret key when using python Django with apache server? 将python Django与apache服务器一起使用时,在哪里存储支付网关密钥?

I don't what to store in settings.py as i will checking this file in my git. 我没有存储在settings.py中的内容,因为我将在git中检查此文件。

Can i do it the same way amazon store AWS ec2 keys. 我可以用亚马逊存储AWS ec2密钥的相同方法来执行此操作吗? If possible how to do it. 如果可能的话,该怎么做。

您可以在环境变量中设置秘密,并以python password = os.getenv('ENVNAME')在python代码中获取它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM