mirror of
https://github.com/HeyPuter/puter.git
synced 2026-04-27 18:51:45 -05:00
Use weak CORS policy for experimental_no_subdomain
This commit is contained in:
@@ -291,7 +291,10 @@ class WebServerService extends BaseService {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin ?? '*');
|
||||
}
|
||||
// Website(s) to allow to connect
|
||||
if ( req.subdomains[req.subdomains.length-1] === 'api' ) {
|
||||
if (
|
||||
config.experimental_no_subdomain ||
|
||||
req.subdomains[req.subdomains.length-1] === 'api'
|
||||
) {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin ?? '*');
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user