mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: popup login in co isolation mode
This commit is contained in:
parent
2a5cec7ee9
commit
8f87770ceb
@ -378,8 +378,9 @@ class WebServerService extends BaseService {
|
|||||||
const origin = req.headers.origin;
|
const origin = req.headers.origin;
|
||||||
|
|
||||||
const is_site = req.hostname.endsWith(config.static_hosting_domain);
|
const is_site = req.hostname.endsWith(config.static_hosting_domain);
|
||||||
|
const is_popup = !! req.query.embedded_in_popup;
|
||||||
|
|
||||||
const co_isolation_okay = is_site || req.co_isolation_enabled;
|
const co_isolation_okay = !is_popup && (is_site || req.co_isolation_enabled);
|
||||||
|
|
||||||
if ( req.path === '/signup' || req.path === '/login' ) {
|
if ( req.path === '/signup' || req.path === '/login' ) {
|
||||||
res.setHeader('Access-Control-Allow-Origin', origin ?? '*');
|
res.setHeader('Access-Control-Allow-Origin', origin ?? '*');
|
||||||
|
Loading…
Reference in New Issue
Block a user