Add support for relative path API endpoints in connectToApi for doExtrasFetch

This adds support for SillyTavern-Extra URLs like "https://<host>/relativepath" in addition to the more common "https://<host>" URLs.
This commit is contained in:
Xifer 2024-05-28 03:18:50 -07:00
parent 0024f96a99
commit 8e21502843
1 changed files with 1 additions and 1 deletions

View File

@ -412,7 +412,7 @@ async function connectToApi(baseUrl) {
}
const url = new URL(baseUrl);
url.pathname = '/api/modules';
url.pathname += '/api/modules';
try {
const getExtensionsResult = await doExtrasFetch(url);