From 92650887e9d3f760e6bfab80e0e0c39180260f8c Mon Sep 17 00:00:00 2001 From: ump45nose <52391318+ump45nose@users.noreply.github.com> Date: Mon, 24 Aug 2026 09:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20expose=20conversation=20id=20to?= =?UTF-8?q?=20browser=20clients?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apps/app_factory.py | 1 + test/backend/app/test_config_app.py | 1 + test/backend/app/test_northbound_base_app.py | 1 + 3 files changed, 3 insertions(+) diff --git a/backend/apps/app_factory.py b/backend/apps/app_factory.py index a6ffc3cb70..e70a132e6a 100644 --- a/backend/apps/app_factory.py +++ b/backend/apps/app_factory.py @@ -51,6 +51,7 @@ def create_app( allow_credentials=True, allow_methods=cors_methods or ["*"], allow_headers=["*"], + expose_headers=["conversation_id"], ) # Register exception handlers diff --git a/test/backend/app/test_config_app.py b/test/backend/app/test_config_app.py index 7ceacdcf83..60b42c70bd 100644 --- a/test/backend/app/test_config_app.py +++ b/test/backend/app/test_config_app.py @@ -82,6 +82,7 @@ def test_config_app_default_cors_config(self): assert cors_middleware.kwargs.get("allow_credentials") is True assert cors_middleware.kwargs.get("allow_methods") == ["*"] assert cors_middleware.kwargs.get("allow_headers") == ["*"] + assert cors_middleware.kwargs.get("expose_headers") == ["conversation_id"] class TestConfigAppRouterConfiguration: diff --git a/test/backend/app/test_northbound_base_app.py b/test/backend/app/test_northbound_base_app.py index 20e911ec46..a25da23640 100644 --- a/test/backend/app/test_northbound_base_app.py +++ b/test/backend/app/test_northbound_base_app.py @@ -316,6 +316,7 @@ def test_cors_middleware_configuration(self): self.assertTrue(cors_middleware.kwargs.get("allow_credentials")) self.assertEqual(cors_middleware.kwargs.get("allow_methods"), ["GET", "POST", "PUT", "DELETE"]) self.assertEqual(cors_middleware.kwargs.get("allow_headers"), ["*"]) + self.assertEqual(cors_middleware.kwargs.get("expose_headers"), ["conversation_id"]) def test_router_inclusion(self): """The main northbound router should be included."""