Unverified Commit 58c4777c authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #8607 from willtakasan/patch-2

Update ui_extra_networks.py
parents c19530f1 42814325
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ def add_pages_to_demo(app):
            raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")

        ext = os.path.splitext(filename)[1].lower()
        if ext not in (".png", ".jpg"):
            raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg.")
        if ext not in (".png", ".jpg", ".webp"):
            raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")

        # would profit from returning 304
        return FileResponse(filename, headers={"Accept-Ranges": "bytes"})