migration des ALLOWED_HOSTS et CORS dans le server_config

This commit is contained in:
2024-06-27 07:46:19 +02:00
parent a03335442b
commit b3279780e8

View File

@@ -27,14 +27,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent
DEBUG = cfg_dev_mode
ALLOWED_HOSTS = ["rh.ambulance-clerc.ch"]
if cfg_dev_mode:
ALLOWED_HOSTS.append("127.0.0.1")
ALLOWED_HOSTS.append("33.144.144.6")
ALLOWED_HOSTS.append("33.144.144.13")
CSRF_TRUSTED_ORIGINS = ['https://rh.ambulance-clerc.ch']
# Application definition
LOGIN_REDIRECT_URL = '/admin'
INSTALLED_APPS = [
@@ -137,15 +129,7 @@ MIDDLEWARE = [
CRON_CLASSES = [
"mycaldav.cron.InitTaskSync",
]
CORS_ALLOWED_ORIGINS = [
"http://33.144.144.13:4173",
"http://33.144.144.13:5173",
"http://33.144.144.13:3000",
]
]
MIDDLEWARE += ('apilog.middleware.APILogMiddleware',)