Skip to content

Commit

Permalink
fix(backend): fix permissions for backend project routes (#1885)
Browse files Browse the repository at this point in the history
* fix(backend): permissions on project router endpoints

* fix(backend): allow addition of fmtm.dev.test to cors for playwright
  • Loading branch information
spwoodcock authored Nov 14, 2024
1 parent c55aef2 commit 431ccc3
Show file tree
Hide file tree
Showing 2 changed files with 428 additions and 388 deletions.
5 changes: 3 additions & 2 deletions src/backend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def assemble_cors_origins(
default_origins = ["https://xlsforms.fmtm.dev"]

# Handle localhost/testing scenario
domain = info.data.get("FMTM_DOMAIN", "localhost")
domain = info.data.get("FMTM_DOMAIN", "fmtm.localhost")
dev_port = info.data.get("FMTM_DEV_PORT", "")
if "localhost" in domain:
# NOTE fmtm.dev.test is used as the Playwright test domain
if "localhost" in domain or "fmtm.dev.test" in domain:
local_server_port = (
f":{dev_port}"
if dev_port and dev_port.lower() not in ("0", "no", "false")
Expand Down
Loading

0 comments on commit 431ccc3

Please sign in to comment.