From c02647cf042eb0002bba8ff8878c8235b392bae3 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Wed, 17 Dec 2014 13:09:58 -0600 Subject: [PATCH] Always allow the /ping/ endpoint, even on secondaries. Also, if content is None, it does not have the keys we are checking for in the ./configure script. --- awx/main/middleware.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/middleware.py b/awx/main/middleware.py index b68aa3e76c..6cc395b458 100644 --- a/awx/main/middleware.py +++ b/awx/main/middleware.py @@ -84,6 +84,10 @@ class HAMiddleware(object): if Instance.objects.my_role() == 'primary': return None + # Always allow the /ping/ endpoint. + if request.path.startswith('/api/v1/ping'): + return None + # Get the primary instance. primary = Instance.objects.primary()