Skip to content

Commit

Permalink
fix: health check path
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Nov 15, 2024
1 parent 48b2399 commit 2bd974b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions codeforlife/urls/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ def get_urlpatterns(
admin.site.urls,
name="admin",
),
path(
"health-check/",
HealthCheckView.as_view(),
name="health-check",
),
path(
"api/csrf/cookie/",
CsrfCookieView.as_view(),
Expand Down Expand Up @@ -80,10 +75,18 @@ def get_urlpatterns(
)
)

health_check_path = path(
"health-check/",
HealthCheckView.as_view(),
name="health-check",
)

if SERVICE_IS_ROOT:
urlpatterns.append(health_check_path)
return urlpatterns

return [
health_check_path,
path(
f"{SERVICE_NAME}/",
include(urlpatterns),
Expand Down

0 comments on commit 2bd974b

Please sign in to comment.