Skip to content

Commit 6cbf83b

Browse files
committed
fix: add staging to cors
1 parent ebd888d commit 6cbf83b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

api/settings.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@ def set_cors_origin_list(cls, cors_origin_list, info: FieldValidationInfo):
4343
valid_cors = cors_origin_list or []
4444

4545
# Add phidata to cors origin list
46-
valid_cors.extend(["https://phidata.app", "https://www.phidata.app", "http://localhost:3000"])
46+
valid_cors.extend(
47+
[
48+
"https://phidata.app",
49+
"https://www.phidata.app",
50+
"http://localhost:3000",
51+
"https://www.stgphi.com",
52+
]
53+
)
4754

4855
runtime_env = info.data.get("runtime_env")
4956
if runtime_env == "dev":
5057
# 3000 is the default port for create-react-app
51-
valid_cors.extend(["http://localhost", "http://localhost:3000"])
58+
valid_cors.extend(["http://localhost", "http://localhost:3000", "https://www.stgphi.com"])
5259

5360
return valid_cors
5461

0 commit comments

Comments
 (0)