Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 08e60bde authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

Django upgrade vers 3.1 + ajout CORS

parent 90b61276
......@@ -28,6 +28,18 @@ DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1','wikicolor-preprod.alem-app.fr','wikicolor.alem-app.fr']
CORS_ORIGIN_ALLOW_ALL = False
CORS_ALLOWED_ORIGINS = [
"http://127.0.0.1:7000",
"http://phonographe.alem-app.fr/"
]
CSRF_TRUSTED_ORIGINS = [
"http://127.0.0.1:7000",
"http://phonographe.alem-app.fr/"
]
# Application definition
INSTALLED_APPS = [
......@@ -37,6 +49,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'hello',
'colorapp',
]
......@@ -44,6 +57,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
......@@ -124,4 +138,5 @@ STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
\ No newline at end of file
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment