Skip to content

Commit

Permalink
fix: add swb stage url env var for host override
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Oct 28, 2024
1 parent 0bb046a commit c3cf8be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/marginfi-v2-trading/src/pages/api/oracle/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)

// restrict host to app domain if not swb stage link
let host = IS_SWB_STAGE
? "http://localhost:3006"
? process.env.SWITCHBOARD_STAGE_URL
: extractHost(req.headers.origin) || extractHost(req.headers.referer);
if (!host) {
return res.status(400).json({ error: "Invalid input: expected a valid host." });
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"NEXT_PUBLIC_INVALIDATE_GCP_CACHE",
"API_AUTH_USERNAME",
"API_AUTH_PASSWORD",
"SWITCHBOARD_CROSSSBAR_API"
"SWITCHBOARD_CROSSSBAR_API",
"SWITCHBOARD_STAGE_URL"
]
}

0 comments on commit c3cf8be

Please sign in to comment.