Package protected review runtime and prepare deployment admission

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
tegwick 2026-09-11 01:21:37 +02:00
parent bb5b607bbd
commit bda9381f07
20 changed files with 3534 additions and 7 deletions

View file

@ -213,6 +213,9 @@ class App:
def main():
from waitress import serve
host = os.environ.get("INFD_LISTEN_HOST", "127.0.0.1")
if host not in ("127.0.0.1", "0.0.0.0"):
raise ValueError("unsupported listener address")
# Waitress does not log request targets; a proxy must also omit callback
# query strings and cookies. No debug traceback middleware belongs here.
login = KeyCapeLogin(os.environ["INFD_KEYCAPE_ISSUER"])
@ -224,7 +227,7 @@ def main():
app = App(login, runtime.controller if runtime else None,
readiness=runtime.pump.ready if runtime else lambda: False)
try:
serve(app, host="127.0.0.1", port=8080, threads=4)
serve(app, host=host, port=8080, threads=4)
finally:
if runtime:
runtime.pump.stop()