mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
gateway: serve nothing to browsers when WEB_STATIC=0
The notice page at "/" was the last thing a browser could get from a host that only exists to answer /ws and /api/feedback. It is gone; every path now 404s, so the gateway hostname has no web presence at all. That broke the container healthcheck, which probed "/" and required a 200 - a correctly configured gateway would have reported itself unhealthy. The probe now has its own route, /healthz, served before the WEB_STATIC branch so it answers in either mode. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
f48c1cc91a
commit
fa4daf7831
2 files changed
+18
-24
No files matched your search
+1
-1
@@ -60,6 +60,6 @@ ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
|
||||
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/healthz').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
|
||||
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in new issue
Block a user