Merge pull request #1013 from JeLuF/text-css

Hardcode CSS content type
This commit is contained in:
cmdr2 2023-03-15 18:44:54 +05:30 committed by GitHub
commit 230f7b478a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,8 @@ from easydiffusion import app, model_manager, task_manager
from easydiffusion.types import TaskData, GenerateImageRequest, MergeRequest
from easydiffusion.utils import log
import mimetypes
log.info(f"started in {app.SD_DIR}")
log.info(f"started at {datetime.datetime.now():%x %X}")
@ -52,6 +54,9 @@ class SetAppConfigRequest(BaseModel):
def init():
mimetypes.init()
mimetypes.add_type('text/css', '.css')
if os.path.isdir(app.CUSTOM_MODIFIERS_DIR):
server_api.mount(
"/media/modifier-thumbnails/custom",