chore: remove django_debug_toolbar and update ALLOWED_HOSTS and CORS settings
This commit is contained in:
parent
b5e0f52822
commit
3b2f8aee30
3 changed files with 4 additions and 8 deletions
|
|
@ -5,7 +5,6 @@ click==8.1.7
|
|||
diff-match-patch==20230430
|
||||
Django==5.0.8
|
||||
django-cors-headers==4.4.0
|
||||
django-debug-toolbar==4.4.6
|
||||
django-grip==3.5.0
|
||||
django-import-export==4.1.1
|
||||
django-redis==5.4.0
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|||
DEFAULT_FROM_EMAIL = 'noreply@videoflix.com'
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'videoflix-django.andre-kempf.com',
|
||||
'videoflix-api.andre-kempf.com',
|
||||
'45.157.177.172',
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
|
|
@ -51,7 +51,7 @@ CORS_ALLOWED_ORIGINS = [
|
|||
]
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = [
|
||||
'https://videoflix-django.andre-kempf.com',
|
||||
'https://videoflix-api.andre-kempf.com',
|
||||
]
|
||||
|
||||
# Application definition
|
||||
|
|
@ -65,7 +65,6 @@ INSTALLED_APPS = [
|
|||
'rest_framework.authtoken',
|
||||
'rest_framework',
|
||||
'corsheaders',
|
||||
'debug_toolbar',
|
||||
'django_rq',
|
||||
'import_export',
|
||||
'user_app',
|
||||
|
|
@ -73,7 +72,7 @@ INSTALLED_APPS = [
|
|||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
|
@ -81,7 +80,6 @@ MIDDLEWARE = [
|
|||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'videoflix.urls'
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ from auth_app.views import (
|
|||
ChangePasswordView
|
||||
)
|
||||
from video_app import views as video_views
|
||||
from debug_toolbar.toolbar import debug_toolbar_urls
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
|
||||
urlpatterns = [
|
||||
|
|
@ -55,4 +54,4 @@ urlpatterns = [
|
|||
path('auth/verify-email/', VerifyEmailView.as_view(), name='verify_email'),
|
||||
path('auth/forgot-password/', ForgotPasswordView.as_view(), name='forgot_password'),
|
||||
path('auth/change-password/', ChangePasswordView.as_view(), name='change_password'),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + debug_toolbar_urls() + staticfiles_urlpatterns()
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + staticfiles_urlpatterns()
|
||||
Loading…
Reference in a new issue