Skip to content

Commit

Permalink
fix: popup login in co isolation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Jul 21, 2024
1 parent 2a5cec7 commit 8f87770
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/backend/src/services/WebServerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ class WebServerService extends BaseService {
const origin = req.headers.origin;

const is_site = req.hostname.endsWith(config.static_hosting_domain);
const is_popup = !! req.query.embedded_in_popup;

const co_isolation_okay = !is_popup && (is_site || req.co_isolation_enabled);

const co_isolation_okay = is_site || req.co_isolation_enabled;

if ( req.path === '/signup' || req.path === '/login' ) {
res.setHeader('Access-Control-Allow-Origin', origin ?? '*');
}
Expand Down

0 comments on commit 8f87770

Please sign in to comment.