This commit is contained in:
zakhy 2024-09-20 11:15:20 +07:00
parent 56d2580599
commit 0bdb466ffd
4 changed files with 24 additions and 1 deletions

17
app/poetry.lock generated
View File

@ -37,6 +37,21 @@ tzdata = {version = "*", markers = "sys_platform == \"win32\""}
argon2 = ["argon2-cffi (>=19.1.0)"]
bcrypt = ["bcrypt"]
[[package]]
name = "django-cors-headers"
version = "4.4.0"
description = "django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS)."
optional = false
python-versions = ">=3.8"
files = [
{file = "django_cors_headers-4.4.0-py3-none-any.whl", hash = "sha256:5c6e3b7fe870876a1efdfeb4f433782c3524078fa0dc9e0195f6706ce7a242f6"},
{file = "django_cors_headers-4.4.0.tar.gz", hash = "sha256:92cf4633e22af67a230a1456cb1b7a02bb213d6536d2dcb2a4a24092ea9cebc2"},
]
[package.dependencies]
asgiref = ">=3.6"
django = ">=3.2"
[[package]]
name = "gunicorn"
version = "23.0.0"
@ -190,4 +205,4 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "0fd97d09e063483e162b9041c2e718f1e9a93161d2bb3eda6800f46052566123"
content-hash = "6e12b80930992cd89d60882a682a72b9be3e6f4dcd614695c5e769bdc8f4a6c8"

View File

@ -16,12 +16,14 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'users',
]
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',
@ -87,3 +89,8 @@ STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CORS_ALLOWED_ORIGINS = [
'http://localhost:443',
'http://localhost:80',
]

View File

@ -10,6 +10,7 @@ python = "^3.10"
django = "^4.2"
gunicorn = "^23.0.0"
psycopg2-binary = "^2.9.9"
django-cors-headers = "^4.4.0"
[build-system]

Binary file not shown.