mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
We don't have any sensitive data, but we do access the file system. On the off chance that some phishing website decides to try to use Liberation as an attack vector, prevent access to the API by unauthorized applications. An API key is generated at each program start and passed to the front end via the QWebChannel.
9 lines
260 B
Python
9 lines
260 B
Python
from fastapi import Depends, FastAPI
|
|
|
|
from . import debuggeometries, eventstream
|
|
from .security import ApiKeyManager
|
|
|
|
app = FastAPI(dependencies=[Depends(ApiKeyManager.verify)])
|
|
app.include_router(debuggeometries.router)
|
|
app.include_router(eventstream.router)
|