Stable Diffusion: RunPod ComfyUI link becomes a copy-URL button (RunPod WAF 403s cross-site link clicks)
| @@ -1571,7 +1571,7 @@ function renderRunpodStatus(status) { | ||
| 1571 | 1571 | const showLink = phase === 'green' && status?.url; |
| 1572 | 1572 | openLink.style.display = showLink ? '' : 'none'; |
| 1573 | 1573 | if (showLink) { |
| 1574 | 1574 | openLink.hrefdataset.url = status.url; |
| 1575 | 1575 | } |
| 1576 | 1576 | } |
| 1577 | 1577 | if (!status) { |
| @@ -7344,6 +7344,20 @@ export async function init() { | ||
| 7344 | 7344 | $('#sd_runpod_lazy_url').on('input', onRunpodLazyUrlInput); |
| 7345 | 7345 | $('#sd_runpod_warmup').on('click', () => runpodControl('warmup')); |
| 7346 | 7346 | $('#sd_runpod_shutdown').on('click', () => runpodControl('shutdown')); |
| 7347 | + // Copy instead of navigate: RunPod's WAF 403s any cross-site link click | |
| 7348 | + // (Sec-Fetch-Site: cross-site); only direct/pasted navigations pass. | |
| 7349 | + $('#sd_runpod_open').on('click', async function () { | |
| 7350 | + const url = this.dataset.url; | |
| 7351 | + if (!url) { | |
| 7352 | + return; | |
| 7353 | + } | |
| 7354 | + try { | |
| 7355 | + await navigator.clipboard.writeText(url); | |
| 7356 | + toastr.info(t`ComfyUI URL copied — paste it into a new browser tab.`, t`Image Generation`); | |
| 7357 | + } catch { | |
| 7358 | + window.prompt('Copy the ComfyUI URL:', url); | |
| 7359 | + } | |
| 7360 | + }); | |
| 7347 | 7361 | $('#sd_runpod_models_add').on('click', onRunpodModelsAddClick); |
| 7348 | 7362 | $('#sd_custom_entry_add').on('click', onAddCustomEntryClick); |
| 7349 | 7363 | $('#sd_custom_entries_list').on('click', '[data-action]', function () { |
| @@ -95,10 +95,10 @@ | ||
| 95 | 95 | <i class="fa-solid fa-power-off"></i> |
| 96 | 96 | <span data-i18n="Shut down">Shut down</span> |
| 97 | 97 | </div> |
| 98 | 98 | <adiv id="sd_runpod_open" class="menu_button menu_button_icon" href="#" target="_blank" rel="noopener" title="OpenCopy the pod's ComfyUI webURL interface(RunPod blocks clicked cross-site links; paste it into a new tab)" data-i18n="[title]sd_runpod_open" style="display: none;"> |
| 99 | 99 | <i class="fa-solid fa-up-right-from-squarecopy"></i> |
| 100 | 100 | <span data-i18n="OpenCopy ComfyUI URL">OpenCopy ComfyUI URL</span> |
| 101 | 101 | </adiv> |
| 102 | 102 | </div> |
| 103 | 103 | <small data-i18n="sd_runpod_small">While a SillyTavern tab is open, a keepalive ping keeps the pod alive; it shuts down 15 minutes after the last activity either way. Red = off, orange = starting/downloading models, green = ready.</small> |
| 104 | 104 | <h5 data-i18n="Model catalog">Model catalog</h5> |