Fix reverse proxy (#1532)

This commit is contained in:
Chenlei Hu
2024-11-13 15:36:35 -05:00
committed by GitHub
parent fba9a03df3
commit b9224464c0

View File

@@ -22,7 +22,12 @@ const guardElectronAccess = (
}
const router = createRouter({
history: isFileProtocol() ? createWebHashHistory() : createWebHistory(),
history: isFileProtocol()
? createWebHashHistory()
: // Base path must be specified to ensure correct relative paths
// Example: For URL 'http://localhost:7801/ComfyBackendDirect',
// we need this base path or assets will incorrectly resolve from 'http://localhost:7801/'
createWebHistory(window.location.pathname),
routes: [
{
path: '/',