Skip to content

Commit 4e7128f

Browse files
committed
local iframeResizer
load iframeResizer from webui assets ASSETS_COMMIT_HASH needs to be updated accordingly after AUTOMATIC1111/stable-diffusion-webui-assets#2 is merged
1 parent 4e0b48e commit 4e7128f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/ui_gradio_extensions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def template_response(*args, **kwargs):
6262

6363
# remove preconnects
6464
res.body = re_preconnect.sub(b'', res.body)
65-
65+
# replace iframeResizer with local version
66+
res.body = res.body.replace(b'src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.6/iframeResizer.contentWindow.min.js"', b'src="webui-assets/js/iframe-resizer/4.3.6/iframeResizer.contentWindow.min.js"')
67+
6668
res.body = res.body.replace(b'</head>', f'{js}<meta name="referrer" content="no-referrer"/></head>'.encode("utf8"))
6769
res.body = res.body.replace(b'</body>', f'{css}</body>'.encode("utf8"))
6870
res.init_headers()

0 commit comments

Comments
 (0)