feat: support reverse-proxy URL subpaths (llama-swap, SwarmUI) (#1122)

This commit is contained in:
Will Miao
2026-09-24 08:04:00 +08:00
parent 755e1a5bca
commit 2f9bd3ee7d
42 changed files with 731 additions and 103 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
*/
import { showToast, copyToClipboard } from '../../utils/uiHelpers.js';
import { setSessionItem, removeSessionItem } from '../../utils/storageHelpers.js';
import { withBasePath } from '../../utils/basePath.js';
/**
* Loads recipes that use the specified model and renders them in the tab.
@@ -356,7 +357,7 @@ function navigateToRecipesPage({ modelKind, displayName, modelHash }) {
}
// Directly navigate to recipes page
window.location.href = '/loras/recipes';
window.location.href = withBasePath('/loras/recipes');
}
/**
@@ -378,7 +379,7 @@ function navigateToRecipeDetails(recipeId) {
setSessionItem('viewRecipeId', recipeId);
// Directly navigate to recipes page
window.location.href = '/loras/recipes';
window.location.href = withBasePath('/loras/recipes');
}
function getRecipesEndpoint(modelKind) {