获取 .env 文件预览
()
| 517 | |
| 518 | @router.get("/env-preview", dependencies=[Depends(require_auth)]) |
| 519 | async def get_env_preview(): |
| 520 | """获取 .env 文件预览""" |
| 521 | try: |
| 522 | content = read_env_content() |
| 523 | if not content: |
| 524 | content = "# .env 文件不存在" |
| 525 | return HTMLResponse(f"<pre>{escape(content)}</pre>") |
| 526 | except Exception as exc: |
| 527 | return HTMLResponse(f"<pre># 读取失败: {escape(str(exc))}</pre>") |
| 528 | |
| 529 | |
| 530 | @router.get("/live-logs", response_class=HTMLResponse) |
nothing calls this directly
no test coverage detected