From 9e4ebc1d5c6d0f8d65b3a0f513c3916296dd84a2 Mon Sep 17 00:00:00 2001 From: Mark Meyer Date: Thu, 24 Aug 2023 14:56:56 -0800 Subject: [PATCH] add 889.smartpay.gov to cors origins --- samtools/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samtools/__init__.py b/samtools/__init__.py index 788c6f5..c1f6e88 100644 --- a/samtools/__init__.py +++ b/samtools/__init__.py @@ -19,6 +19,7 @@ "http://localhost", "http://localhost:5173", "http://127.0.0.1:5173", + "https://889.smartpay.gsa.gov" ] @@ -30,7 +31,7 @@ def create_app(name=__name__): app.add_middleware( CORSMiddleware, allow_origins=origins, - allow_origin_regex='https://federalist.*\.sites\.pages\.cloud\.gov', + allow_origin_regex=r'https://federalist.*\.sites\.pages\.cloud\.gov', allow_credentials=True, allow_methods=["*"], allow_headers=["*"], @@ -56,7 +57,7 @@ async def search_v3( return response except Exception as exception: logging.exception(exception) - raise HTTPException(status_code=400, detail="Problem connecting to SAM.gov") + raise HTTPException(status_code=400, detail="Problem connecting to SAM.gov") # noqa E501 return app