mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Add experimental_no_subdomain flag
This commit is contained in:
parent
1c2e4968e2
commit
fe88880486
@ -112,7 +112,9 @@ const computed_defaults = {
|
||||
pub_port: config => config.http_port,
|
||||
origin: config => config.protocol + '://' + config.domain +
|
||||
(config.pub_port !== 80 && config.pub_port !== 443 ? ':' + config.pub_port : ''),
|
||||
api_base_url: config => config.protocol + '://api.' + config.domain +
|
||||
api_base_url: config => config.experimental_no_subdomain
|
||||
? config.origin
|
||||
: config.protocol + '://api.' + config.domain +
|
||||
(config.pub_port !== 80 && config.pub_port !== 443 ? ':' + config.pub_port : ''),
|
||||
social_card: config => `${config.origin}/assets/img/screenshot.png`,
|
||||
};
|
||||
|
@ -1128,6 +1128,7 @@ async function deleteUser(user_id){
|
||||
}
|
||||
|
||||
function subdomain(req){
|
||||
if ( config.experimental_no_subdomain ) return 'api';
|
||||
return req.hostname.slice(0, -1 * (config.domain.length + 1));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user