【发布时间】:2020-05-05 06:59:02
【问题描述】:
我不确定为我的 PostgreSQL 数据库连接使用纯文本密码是否不安全。
即
在我的“settings.py”文件中:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'my_database', # database name
'USER': 'username', # P.user
'PASSWORD': 'plaintext password goes here',
'HOST': 'localhost', # where is locate our database?
'PORT': '',
}
}
如果不安全,请提供有关如何处理这种情况的更多信息。
注意:我在我的网页上使用 https,但我只是想知道即使连接在本地,我是否也必须保护它。
【问题讨论】:
标签: python django django-settings