Spaces:
Sleeping
Sleeping
Add favicon route for clean console
Browse files- server/app.py +7 -1
server/app.py
CHANGED
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
| 5 |
from textwrap import dedent
|
| 6 |
|
| 7 |
import uvicorn
|
| 8 |
-
from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse, RedirectResponse
|
| 9 |
from openenv.core.env_server.http_server import create_fastapi_app
|
| 10 |
|
| 11 |
try:
|
|
@@ -346,6 +346,7 @@ WEB_PAGE = dedent(
|
|
| 346 |
<meta charset="utf-8">
|
| 347 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 348 |
<title>Engineer Manager</title>
|
|
|
|
| 349 |
<link rel="stylesheet" href="/assets/app.css">
|
| 350 |
</head>
|
| 351 |
<body>
|
|
@@ -432,6 +433,11 @@ def web_js() -> PlainTextResponse:
|
|
| 432 |
return PlainTextResponse(WEB_JS, media_type="application/javascript")
|
| 433 |
|
| 434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
@app.get("/manifest.json", include_in_schema=False)
|
| 436 |
def manifest() -> JSONResponse:
|
| 437 |
return JSONResponse(
|
|
|
|
| 5 |
from textwrap import dedent
|
| 6 |
|
| 7 |
import uvicorn
|
| 8 |
+
from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse, RedirectResponse, Response
|
| 9 |
from openenv.core.env_server.http_server import create_fastapi_app
|
| 10 |
|
| 11 |
try:
|
|
|
|
| 346 |
<meta charset="utf-8">
|
| 347 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 348 |
<title>Engineer Manager</title>
|
| 349 |
+
<link rel="icon" href="/favicon.ico" sizes="any">
|
| 350 |
<link rel="stylesheet" href="/assets/app.css">
|
| 351 |
</head>
|
| 352 |
<body>
|
|
|
|
| 433 |
return PlainTextResponse(WEB_JS, media_type="application/javascript")
|
| 434 |
|
| 435 |
|
| 436 |
+
@app.get("/favicon.ico", include_in_schema=False)
|
| 437 |
+
def favicon() -> Response:
|
| 438 |
+
return Response(status_code=204)
|
| 439 |
+
|
| 440 |
+
|
| 441 |
@app.get("/manifest.json", include_in_schema=False)
|
| 442 |
def manifest() -> JSONResponse:
|
| 443 |
return JSONResponse(
|