mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 23:15:49 +03:00
[GH-ISSUE #933] [BUG] Problems with PING_ENDPOINT #656
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#656
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hknobbe on GitHub (Dec 22, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/933
Hi!
I was trying to update the PING_ENDPOINT and found some bugs:
When adding de - PING_ENDPOINT to my docker-compose I found some problems:
System:
Compose:
No strange things in the logs.
Everything else works as it suppose to.
Let me know if you need anything else.
@hknobbe commented on GitHub (Dec 22, 2023):
Update:
The UI shows:
@cuu508 commented on GitHub (Dec 22, 2023):
Thanks for the report. I added the following notes to PING_ENDPOINT docs:
@hknobbe commented on GitHub (Dec 22, 2023):
awesome @cuu508 thanks!
For the archives, and anyone who is running in to the same issue.
I used this for NGINX Reverse Proxy:
@purplebite commented on GitHub (Aug 4, 2025):
For the archives and anyone else encountering this issue, I've successfully solved the
PING_ENDPOINTproblem with a custom Django middleware solution. This approach eliminates the need for a reverse proxy and enables direct deployment to platforms like Fly.io.The Problem
When using a separate
PING_ENDPOINTdomain (e.g.,https://ping.hc.example.com/), requests to that domain return 404 errors because Django doesn't know how to route them to the/ping/endpoints.My Solution
I created a custom middleware that automatically rewrites requests from the ping domain to include the
/ping/prefix. Here's how it works and ignore the single Fly.io specific line to copy fly.toml into the docker to ensure environment variables are available.Dockerfile:
local_settings.py (Custom Middleware):
How It Works
PING_ENDPOINTand compares it toSITE_ROOT/ping/https://ping.hc.example.com/{uuid}work as expected by internally routing to/ping/{uuid}@cuu508 - I'm wondering if this functionality (or something similar) should be part of the core application? It seems counterintuitive that you can configure a
PING_ENDPOINTbut then need to handle the routing yourself outside the application. The middleware approach works well for my usage, but having built-in support for separate ping domains would make the feature more user-friendly out of the box.