feat: use regex to allow origins

This commit is contained in:
swve 2023-07-12 10:55:55 +01:00
parent af4bd8b1d7
commit 6e9998d45c

1
app.py
View file

@ -31,7 +31,6 @@ app = FastAPI(
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origin_regex=learnhouse_config.hosting_config.allowed_regexp, allow_origin_regex=learnhouse_config.hosting_config.allowed_regexp,
allow_origins=learnhouse_config.hosting_config.allowed_origins,
allow_methods=["*"], allow_methods=["*"],
allow_credentials=True, allow_credentials=True,
allow_headers=["*"], allow_headers=["*"],