Skip to content

Commit 67aef63

Browse files
Fix static hosting domain fallback for self-hosted custom domains
1 parent 393500d commit 67aef63

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/dev-center/js/dev-center.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ if ( window.url_params.has('puter.domain') ) {
4545

4646
// static hosting domain
4747
window.static_hosting_domain = 'puter.site';
48-
if ( window.domain === 'puter.localhost' ) {
49-
window.static_hosting_domain = 'site.puter.localhost';
50-
}
48+
if ( window.domain === 'puter.localhost' ) {
49+
window.static_hosting_domain = 'site.puter.localhost';
50+
} else if ( window.domain && window.domain !== 'puter.com' ) {
51+
window.static_hosting_domain = `site.${window.domain}`;
52+
}
5153

5254
// add port to static_hosting_domain if provided
5355
if ( window.url_params.has('puter.port') && window.url_params.get('puter.port') ) {

0 commit comments

Comments
 (0)