AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
131.7k stars 25.27k forks source link

Add correct mimetype for .mjs files #15654

Open huchenlei opened 3 weeks ago

huchenlei commented 3 weeks ago

Description

We have https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0/modules/ui_gradio_extensions.py#L22-L23 loading extension's javascript file as js module. However, without this PR, mjs is not sending out with correct mime type by FastAPI.

Blocking https://github.com/Mikubill/sd-webui-controlnet/pull/2822.

Screenshots/videos:

image

Checklist: