fix: missing cors whitelist
This commit is contained in:
@@ -7,6 +7,11 @@ VERSION = "0.1.0"
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL = DEBUG
|
||||
|
||||
if not DEBUG:
|
||||
import socket
|
||||
ALLOWED_HOSTS.append(socket.gethostbyname(socket.gethostname()))
|
||||
|
||||
|
||||
DJANGO_APPS = [
|
||||
"unfold", # before django.contrib.admin
|
||||
"django.contrib.admin",
|
||||
|
||||
@@ -14,6 +14,8 @@ if os.path.exists(env_file):
|
||||
SECRET_KEY = env.str("SECRET_KEY", "this-is-the-default-secret-key")
|
||||
DEBUG = env.bool("DEBUG", True)
|
||||
|
||||
CORS_ORIGIN_WHITELIST = env.str('CORS_ORIGIN_WHITELIST', default='').split(',')
|
||||
|
||||
DATABASE_URL = env.db_url("DATABASE_URL", "sqlite:///db.sqlite3")
|
||||
|
||||
STATIC_ROOT = env.str("STATIC_ROOT", "static")
|
||||
|
||||
Reference in New Issue
Block a user