mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
fix: update db url to be ipv4 for ssl context match
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
DB_NAME=piku_test_db
|
DB_NAME=piku_test_db
|
||||||
DB_USER=test
|
DB_USER=test
|
||||||
DB_PASSWORD=password123
|
DB_PASSWORD=password123
|
||||||
DB_HOST=localhost
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=5433
|
DB_PORT=5433
|
||||||
|
|
||||||
# SSL
|
# SSL
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
DB_NAME=piku
|
DB_NAME=piku
|
||||||
DB_USER=user
|
DB_USER=user
|
||||||
DB_PASSWORD=password123
|
DB_PASSWORD=password123
|
||||||
DB_HOST=localhost
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
|
|
||||||
# SSL
|
# SSL
|
||||||
|
|||||||
@@ -25,8 +25,11 @@ env_file = os.environ.get("PIKU_ENV_FILE", os.path.join(BASE_DIR.parent, ".env")
|
|||||||
if os.path.exists(env_file):
|
if os.path.exists(env_file):
|
||||||
environ.Env.read_env(env_file, overwrite=False)
|
environ.Env.read_env(env_file, overwrite=False)
|
||||||
|
|
||||||
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[])
|
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["127.0.0.1"])
|
||||||
ALLOWED_HOSTS.append(env("FRONTEND_DOMAIN"))
|
ALLOWED_HOSTS.append(env("FRONTEND_DOMAIN", default="127.0.0.1"))
|
||||||
|
ALLOWED_HOSTS.append(env("BACKEND_DOMAIN", default="127.0.0.1"))
|
||||||
|
|
||||||
|
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])
|
||||||
|
|
||||||
SSL_ENABLED = env.bool("SSL_ENABLED", default=False)
|
SSL_ENABLED = env.bool("SSL_ENABLED", default=False)
|
||||||
URI_SCHEME = "https://" if SSL_ENABLED else "http://"
|
URI_SCHEME = "https://" if SSL_ENABLED else "http://"
|
||||||
@@ -98,6 +101,7 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CORS_ALLOWED_ORIGINS = FRONTEND_URLS
|
CORS_ALLOWED_ORIGINS = FRONTEND_URLS
|
||||||
|
CSRF_TRUSTED_ORIGINS += FRONTEND_URLS
|
||||||
CORS_ALLOW_CREDENTIALS = True
|
CORS_ALLOW_CREDENTIALS = True
|
||||||
|
|
||||||
AUTH_USER_MODEL = "users.User"
|
AUTH_USER_MODEL = "users.User"
|
||||||
|
|||||||
Reference in New Issue
Block a user