diff options
-rw-r--r-- | lom_api/settings.py | 7 | ||||
-rw-r--r-- | python.req | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lom_api/settings.py b/lom_api/settings.py index 7c85027..a09c7a7 100644 --- a/lom_api/settings.py +++ b/lom_api/settings.py | |||
@@ -26,6 +26,7 @@ SECRET_KEY = 'django-insecure-w699xg1453&j057k$g465vldjn+4*skp8!13ua=aq0s_91b@c) | |||
26 | DEBUG = True | 26 | DEBUG = True |
27 | 27 | ||
28 | ALLOWED_HOSTS = ['*'] | 28 | ALLOWED_HOSTS = ['*'] |
29 | CORS_ORIGIN_ALLOW_ALL = True | ||
29 | 30 | ||
30 | 31 | ||
31 | # Application definition | 32 | # Application definition |
@@ -39,6 +40,7 @@ INSTALLED_APPS = [ | |||
39 | 'django.contrib.staticfiles', | 40 | 'django.contrib.staticfiles', |
40 | 'rest_framework', | 41 | 'rest_framework', |
41 | 'knox', | 42 | 'knox', |
43 | 'corsheaders', | ||
42 | 'auth_api', | 44 | 'auth_api', |
43 | 'chat_api' | 45 | 'chat_api' |
44 | ] | 46 | ] |
@@ -48,9 +50,9 @@ REST_FRAMEWORK = { | |||
48 | } | 50 | } |
49 | 51 | ||
50 | REST_KNOX = { | 52 | REST_KNOX = { |
51 | 'TOKEN_LIMIT_PER_USER': 1, | 53 | # 'TOKEN_LIMIT_PER_USER': 1, |
52 | } | 54 | } |
53 | 55 | ||
54 | MIDDLEWARE = [ | 56 | MIDDLEWARE = [ |
55 | 'django.middleware.security.SecurityMiddleware', | 57 | 'django.middleware.security.SecurityMiddleware', |
56 | 'django.contrib.sessions.middleware.SessionMiddleware', | 58 | 'django.contrib.sessions.middleware.SessionMiddleware', |
@@ -59,6 +61,7 @@ MIDDLEWARE = [ | |||
59 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | 61 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
60 | 'django.contrib.messages.middleware.MessageMiddleware', | 62 | 'django.contrib.messages.middleware.MessageMiddleware', |
61 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', | 63 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
64 | 'corsheaders.middleware.CorsMiddleware', | ||
62 | ] | 65 | ] |
63 | 66 | ||
64 | ROOT_URLCONF = 'lom_api.urls' | 67 | ROOT_URLCONF = 'lom_api.urls' |
@@ -2,6 +2,7 @@ asgiref==3.4.1 | |||
2 | cffi==1.15.0 | 2 | cffi==1.15.0 |
3 | cryptography==35.0.0 | 3 | cryptography==35.0.0 |
4 | Django==3.2.9 | 4 | Django==3.2.9 |
5 | django-cors-headers==3.10.0 | ||
5 | django-rest-knox==4.1.0 | 6 | django-rest-knox==4.1.0 |
6 | djangorestframework==3.12.4 | 7 | djangorestframework==3.12.4 |
7 | pycparser==2.21 | 8 | pycparser==2.21 |