|
1 | 1 | from django.conf import settings |
2 | | -from django.urls import include, re_path |
| 2 | +from django.urls import include, path, re_path |
3 | 3 |
|
4 | 4 | from common.core import views |
5 | 5 |
|
6 | 6 | urlpatterns = [ |
7 | | - re_path(r"^version/?", views.version_info), |
8 | | - re_path(r"^health/liveness/?", views.liveness), |
9 | | - re_path(r"^health/readiness/?", include("health_check.urls", namespace="health")), |
| 7 | + path(r"^version/?", views.version_info), |
| 8 | + path(r"^health/liveness/?", views.liveness), |
| 9 | + path(r"^health/readiness/?", include("health_check.urls", namespace="health")), |
10 | 10 | re_path(r"^health", include("health_check.urls", namespace="health-deprecated")), |
11 | 11 | # Aptible health checks must be on /healthcheck and cannot redirect |
12 | 12 | # see https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/health-checks |
13 | 13 | re_path(r"^healthcheck", include("health_check.urls", namespace="health-aptible")), |
14 | 14 | ] |
15 | 15 |
|
16 | 16 | if settings.PROMETHEUS_ENABLED: |
17 | | - urlpatterns += [re_path(r"^metrics/?", views.metrics)] |
| 17 | + urlpatterns += [path("metrics", views.metrics)] |
0 commit comments