Skip to content

Commit 803f440

Browse files
committed
fix: terminal not loading in self-hosted
1 parent f5a7b06 commit 803f440

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/puter-js/src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ import { XDIncomingService } from './services/XDIncoming.js';
2020
import { NoPuterYetService } from './services/NoPuterYet.js';
2121
import { Debug } from './modules/Debug.js';
2222

23+
// TODO: This is for a safe-guard below; we should check if we can
24+
// generalize this behavior rather than hard-coding it.
25+
// (using defaultGUIOrigin breaks locally-hosted apps)
26+
const PROD_ORIGIN = 'https://puter.com';
27+
2328
window.puter = (function() {
2429
'use strict';
2530

@@ -132,7 +137,7 @@ window.puter = (function() {
132137
let hostname = location.hostname.replace(/\.$/, '');
133138

134139
// Create a new URL object with the URL string
135-
const url = new URL(this.defaultGUIOrigin);
140+
const url = new URL(PROD_ORIGIN);
136141

137142
// Extract hostname from the URL object
138143
const gui_hostname = url.hostname;

0 commit comments

Comments
 (0)