Fix GET /mcp 405 log spam and resolve_account email matching

Add a custom GET /mcp health route so health checks and client polling
return 200 instead of flooding logs with 405. Also allow resolve_account
to match by email address (from_address, imap_username, smtp_username)
in addition to account ID.
This commit is contained in:
Kacper Kwapisz
2026-03-23 19:33:51 +01:00
parent bbee0acb13
commit fef9157c4a
2 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -22,6 +22,6 @@ EXPOSE 3000
ENV PORT=3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import httpx; r = httpx.get('http://localhost:3000/mcp', timeout=5); assert r.status_code == 405" || exit 1
CMD python -c "import httpx; r = httpx.get('http://localhost:3000/mcp', timeout=5); assert r.status_code == 200" || exit 1
CMD ["python", "src/server.py"]