We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f9bef3 commit be942fbCopy full SHA for be942fb
src/scripts/api.ts
@@ -382,7 +382,13 @@ export class ComfyApi extends EventTarget {
382
super()
383
this.user = ''
384
this.api_host = location.host
385
- this.api_base = location.pathname.split('/').slice(0, -1).join('/')
+ const pathname = location.pathname
386
+ const isCloudSpaRoute = isCloud && pathname.startsWith('/cloud/')
387
+ if (isCloudSpaRoute) {
388
+ this.api_base = ''
389
+ } else {
390
+ this.api_base = pathname.split('/').slice(0, -1).join('/')
391
+ }
392
console.log('Running on', this.api_host)
393
this.initialClientId = sessionStorage.getItem('clientId')
394
}
0 commit comments