From 576d6274bb66bc1126b7ae6278f021eb414f3bd2 Mon Sep 17 00:00:00 2001 From: Simeranjeet Sandhu Date: Mon, 21 Oct 2024 07:20:17 -0700 Subject: [PATCH] Adding health checks --- app/openlxp_xss_project/settings.py | 3 +++ app/openlxp_xss_project/urls.py | 2 ++ requirements.txt | 2 ++ 3 files changed, 7 insertions(+) diff --git a/app/openlxp_xss_project/settings.py b/app/openlxp_xss_project/settings.py index 20c904b..4e5bad0 100644 --- a/app/openlxp_xss_project/settings.py +++ b/app/openlxp_xss_project/settings.py @@ -49,6 +49,7 @@ 'rest_framework.authtoken', 'core.apps.CoreConfig', 'api', + 'health_check', 'users', 'social_django', 'openlxp_authentication', @@ -190,6 +191,8 @@ CSRF_COOKIE_DOMAIN = '.deloitteopenlxp.com' CSRF_TRUSTED_ORIGINS = ['https://dev-ldss.deloitteopenlxp.com', ] +SECURE_SSL_REDIRECT = False + AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'openlxp_authentication.models.SAMLDBAuth', diff --git a/app/openlxp_xss_project/urls.py b/app/openlxp_xss_project/urls.py index cc710f3..9777799 100644 --- a/app/openlxp_xss_project/urls.py +++ b/app/openlxp_xss_project/urls.py @@ -24,4 +24,6 @@ re_path('admin/', admin.site.urls), re_path('api/', include('api.urls')), re_path('api/auth/', include('users.urls')), + re_path('health/', include('health_check.urls'), + name='health_check') ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/requirements.txt b/requirements.txt index 48583f4..4300477 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,8 @@ django-colorfield>=0.11.0 django-cors-headers>=3.7.0,<3.8.0 +django-health-check>3.18.0, <3.19.0 + django-model-utils>=4.1.1,<4.2.0 django-mysql>=4.4.0,<5.0.0