mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Use weak CORS policy for experimental_no_subdomain
This commit is contained in:
parent
fe88880486
commit
343edbff51
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user