Only show the product version header when the requester is authenticated (#14135)

This commit is contained in:
Christian Adams
2023-07-26 18:38:05 -04:00
committed by GitHub
parent bd0089fd35
commit b549ae1efa
3 changed files with 3 additions and 23 deletions

View File

@@ -232,7 +232,8 @@ class APIView(views.APIView):
response = super(APIView, self).finalize_response(request, response, *args, **kwargs)
time_started = getattr(self, 'time_started', None)
response['X-API-Product-Version'] = get_awx_version()
if request.user.is_authenticated:
response['X-API-Product-Version'] = get_awx_version()
response['X-API-Product-Name'] = server_product_name()
response['X-API-Node'] = settings.CLUSTER_HOST_ID