This commit is contained in:
2026-04-15 11:48:14 +09:00
parent 77614634ce
commit f26f9ab652
+1 -1
View File
@@ -94,7 +94,7 @@ async def fake_error_page(request: Request, code: str):
@app.api_route("/{full_path:path}", methods=["GET", "POST", "HEAD"]) @app.api_route("/{full_path:path}", methods=["GET", "POST", "HEAD"])
async def default_response(request: Request, full_path: str) -> Response: async def default_response(request: Request, full_path: str) -> Response:
if not full_path.endswith(".html") or not full_path.endswith(".md"): if not full_path.endswith(".html") and not full_path.endswith(".md"):
try: try:
if static := resolve_static_file(full_path): if static := resolve_static_file(full_path):
return FileResponse(static) return FileResponse(static)