From e0a7cc5e0fc3b9c9ca2e0e0a446dee18f97f00ff Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 16 Nov 2023 20:11:55 -0800 Subject: [PATCH] Simplify CORS code --- extensions/openai/script.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/extensions/openai/script.py b/extensions/openai/script.py index 283f7f90..2128444e 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -67,16 +67,8 @@ app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, - allow_methods=["GET", "HEAD", "OPTIONS", "POST", "PUT"], - allow_headers=[ - "Origin", - "Accept", - "X-Requested-With", - "Content-Type", - "Access-Control-Request-Method", - "Access-Control-Request-Headers", - "Authorization", - ], + allow_methods=["*"], + allow_headers=["*"] )