mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user