From 713c01193fb513e1e68dd1d66c7190b330ec164c Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 16 May 2025 14:05:36 +0200 Subject: [PATCH] sec: no crossorigin allow --- api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api.py b/api.py index 194a29d..f326c39 100755 --- a/api.py +++ b/api.py @@ -34,7 +34,7 @@ config.read('config.ini') api.add_middleware( CORSMiddleware, - allow_origins=["*"], + allow_origins=["http://localhost", "http://localhost:3000"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], @@ -212,7 +212,6 @@ async def process_query(request: QueryRequest): query_resp.success = str(interaction.last_success) query_resp.blocks = blocks_json - # Store the raw dictionary representation query_resp_dict = { "done": query_resp.done, "answer": query_resp.answer,