updating cors warning visibility when giving permission. see #524

This commit is contained in:
mic 2026-02-01 23:52:35 +01:00
parent 2bc292e414
commit 04150fcbbf

View file

@ -966,6 +966,7 @@ export async function injectConnectionUI({
let ollama_host = document.getElementById(getPrefixedId("ollama_host")).value; let ollama_host = document.getElementById(getPrefixedId("ollama_host")).value;
if(ollama_host != ''){ if(ollama_host != ''){
varConnectionUI.permission_ollama_host = await messenger.permissions.request({ origins: [prepareOriginURL(ollama_host)] }); varConnectionUI.permission_ollama_host = await messenger.permissions.request({ origins: [prepareOriginURL(ollama_host)] });
updateCORSWarnings(modelId_prefix);
} }
}); });
@ -973,6 +974,7 @@ export async function injectConnectionUI({
let openai_comp_host = document.getElementById(getPrefixedId("openai_comp_host")).value; let openai_comp_host = document.getElementById(getPrefixedId("openai_comp_host")).value;
if(openai_comp_host != ''){ if(openai_comp_host != ''){
varConnectionUI.permission_openai_comp_host = await messenger.permissions.request({ origins: [prepareOriginURL(openai_comp_host)] }); varConnectionUI.permission_openai_comp_host = await messenger.permissions.request({ origins: [prepareOriginURL(openai_comp_host)] });
updateCORSWarnings(modelId_prefix);
} }
}); });