From a9906bb8262be8918969c2fb8b49e20b6ed7d10a Mon Sep 17 00:00:00 2001 From: Andrew Shumway Date: Mon, 14 Apr 2025 13:32:10 -0600 Subject: [PATCH] Explicitly state response type --- app/status/healthcheck.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/status/healthcheck.py b/app/status/healthcheck.py index 48afa395e..52c458f73 100644 --- a/app/status/healthcheck.py +++ b/app/status/healthcheck.py @@ -1,4 +1,4 @@ -from flask import Blueprint, jsonify, request +from flask import Blueprint, jsonify, request, make_response from sqlalchemy import text from app import db, version @@ -27,14 +27,13 @@ def show_status(): @status.route("/_status/live-service-and-organization-counts") def live_service_and_organization_counts(): - return ( - jsonify( + response = make_response(jsonify( organizations=dao_count_organizations_with_live_services(), services=dao_count_live_services(), - headers={"Content-Type": "application/json"}, ), - 200, - ) + 200,) + response.headers["Content-Type"] = "application/json" + return response def get_db_version():