mirror of
https://github.com/HeyPuter/puter.git
synced 2026-07-08 16:21:40 +00:00
Unconditionally send Access-Control-Allow-Private-Network, fix LNA fix in GUI
This commit is contained in:
@@ -622,12 +622,7 @@ export class PuterServer {
|
||||
res.setHeader('Access-Control-Allow-Methods', allowedMethods);
|
||||
res.setHeader('Access-Control-Allow-Headers', allowedHeaders);
|
||||
|
||||
// Private Network Access: grant public origins permission to
|
||||
// reach loopback/private addresses (e.g. self-hosted Puter on
|
||||
// localhost, or api.puter.com pointed at a local IP via hosts).
|
||||
if (req.headers['access-control-request-private-network']) {
|
||||
res.setHeader('Access-Control-Allow-Private-Network', 'true');
|
||||
}
|
||||
res.setHeader('Access-Control-Allow-Private-Network', 'true');
|
||||
|
||||
// Disable iframes on the main domain
|
||||
if (req.hostname === config.domain) {
|
||||
|
||||
@@ -407,7 +407,7 @@ async function UIWindow (options) {
|
||||
style="${!options.has_head ? ' height: 100%;' : ''}">`;
|
||||
// iframe, for apps
|
||||
if ( options.iframe_url || options.iframe_srcdoc ) {
|
||||
let allow_str = 'screen-wake-lock; picture-in-picture; document-picture-in-picture; camera; encrypted-media; gamepad; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write; fullscreen; web-share; file-system-handle; local-storage; downloads; autoplay;';
|
||||
let allow_str = 'screen-wake-lock; picture-in-picture; document-picture-in-picture; camera; encrypted-media; gamepad; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write; fullscreen; web-share; file-system-handle; local-storage; downloads; autoplay; local-network-access;';
|
||||
if ( window.co_isolation_enabled )
|
||||
{
|
||||
allow_str += ' cross-origin-isolated;';
|
||||
|
||||
Reference in New Issue
Block a user