Skip to content

Commit

Permalink
Merge branch 'feat/feat_branch_deploy' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Jul 2, 2024
2 parents f2b2244 + 53d17bc commit 03e4b1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/containers/server/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ export async function handleShare(req: Request, res: Response, next) {
export async function handlePopupClose(req: Request, res: Response, next) {
try {
const state = new URLSearchParams(req.query.state.toString());
if (!process.env.AUTH_INSTANCE) { // main auth host
const instance = state.get('instance');
if (instance && instance.match(/^pr-\d+$/)) {
next();
return;
}
}

if (state.get('popupWindow') === 'true') {
openerRedirect(res, req.url.replace('popupWindow', ''));
return;
Expand Down

0 comments on commit 03e4b1f

Please sign in to comment.