This commit is contained in:
1 parent
f34bb39d31
commit
92b701fd59
2 files changed
+5
-1
No files matched your search
@@ -14,8 +14,9 @@ async def lifespan(app: FastAPI):
|
|||||||
app.state.mqtt_manager = MQTTManager.setup_and_start()
|
app.state.mqtt_manager = MQTTManager.setup_and_start()
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
docs_url = "docs" if settings.web.show_docs else None
|
||||||
|
|
||||||
app = FastAPI(lifespan=lifespan)
|
app = FastAPI(lifespan=lifespan, docs_url=docs_url)
|
||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
AuthenticationMiddleware,
|
AuthenticationMiddleware,
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
[web]
|
[web]
|
||||||
|
host='0.0.0.0'
|
||||||
|
port=8000
|
||||||
allowed_origins = ["http://localhost:5173"]
|
allowed_origins = ["http://localhost:5173"]
|
||||||
|
show_docs = true
|
||||||
|
|
||||||
[redis]
|
[redis]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|||||||
Reference in new issue
Block a user