diff --git a/config/urls.py b/config/urls.py index 20cd86fc..ea1148a8 100644 --- a/config/urls.py +++ b/config/urls.py @@ -8,6 +8,7 @@ from django.views import defaults from django.views import static as static_views from django.http import JsonResponse +from django.shortcuts import redirect from rest_framework import permissions from drf_yasg.views import get_schema_view @@ -59,6 +60,9 @@ permission_classes=(permissions.AllowAny,), ) +def health_redirect(request): + return redirect(API_BASE_URL + 'health') + def health_check(request): return JsonResponse({'status': 'ok'}) @@ -66,7 +70,8 @@ def health_check(request): # Django Admin path('admin/', admin.site.urls), - path('health', health_check), + path('health', health_redirect), + path(API_BASE_URL + 'health', health_check), # api docs re_path(