From 4ffaa5a9386b1cbfa49cd89da42e8533106f31d1 Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Tue, 23 Apr 2024 09:48:03 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20=E4=BF=AE=E5=A4=8D=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 5 +++-- config.yaml | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index cac0ee5..7a40e2f 100644 --- a/app/main.py +++ b/app/main.py @@ -132,8 +132,9 @@ app = FastAPI( app.include_router(api_router, prefix="/api") # PyWebIO APP -webapp = asgi_app(lambda: MainView().main_view()) -app.mount("/", webapp) +if config['Web']['PyWebIO_Enable']: + webapp = asgi_app(lambda: MainView().main_view()) + app.mount("/", webapp) if __name__ == '__main__': uvicorn.run(app, host=Host_IP, port=Host_Port) diff --git a/config.yaml b/config.yaml index 835447c..138ec33 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,8 @@ # Web Web: + # APP Switch + PyWebIO_Enable: true # Enable APP | 启用APP + # APP Information Domain: https://douyin.wtf # Web domain | Web域名