We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4db92ff commit 6fb284eCopy full SHA for 6fb284e
homu/server.py
@@ -950,10 +950,19 @@ def admin():
950
return 'Unrecognized command'
951
952
953
+@get('/health')
954
+def health():
955
+ return 'OK'
956
+
957
958
def redirect_to_canonical_host():
959
request_url = urllib.parse.urlparse(request.url)
960
redirect_url = request_url
961
962
+ # Disable redirects on the health check endpoint.
963
+ if request_url.path == "/health":
964
+ return
965
966
# Handle hostname changes
967
if "canonical_url" in g.cfg["web"]:
968
canonical_url = urllib.parse.urlparse(g.cfg["web"]["canonical_url"])
0 commit comments