1
This commit is contained in:
@@ -94,6 +94,16 @@ async def get_stats(db: Session = Depends(get_db)):
|
||||
}
|
||||
|
||||
|
||||
# Config endpoint (for frontend to get API token and server info)
|
||||
@app.get(f"{settings.API_PREFIX}/config")
|
||||
async def get_config():
|
||||
"""Get frontend configuration (API token, server URLs, etc.)"""
|
||||
return {
|
||||
"api_token": settings.API_TOKEN,
|
||||
"iperf_server": "10.0.1.97"
|
||||
}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
uvicorn.run("app.main:app", host="0.0.0.0", port=8007, reload=True)
|
||||
|
||||
Reference in New Issue
Block a user