We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a3e8000 + 12d62a3 commit 7a14d35Copy full SHA for 7a14d35
1 file changed
src/main.py
@@ -1,4 +1,5 @@
1
import logging
2
+import os
3
import re
4
import uuid
5
from collections.abc import Awaitable, Callable
@@ -168,9 +169,12 @@ async def lifespan(_: FastAPI):
168
169
)
170
171
origins = [
- "http://localhost",
172
- "http://127.0.0.1:8000",
173
- "https://api.honcho.dev",
+ origin.strip()
+ for origin in os.getenv(
174
+ "CORS_ORIGINS",
175
+ "http://localhost,http://127.0.0.1:8000,https://api.honcho.dev",
176
+ ).split(",")
177
+ if origin.strip()
178
]
179
180
app.add_middleware(
0 commit comments