mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 08:09:49 +08:00
The PR's relative-path + proxy.ts rewrite design depends on two env vars (DEEPTUTOR_API_BASE_URL, DEEPTUTOR_AUTH_ENABLED) read server-side by the Next.js middleware. As submitted they were only set by the Docker entrypoint, and the auth one read a non-existent auth.json key — so auth enforcement was silently disabled and the PyPI `deeptutor start` path was unwired. - Export both vars from render_environment() (the single JSON-backed source of truth), so the Docker entrypoint AND the `deeptutor start` launcher get them consistently. DEEPTUTOR_API_BASE_URL falls back to localhost:<backend_port>. - launcher.py: set both in common_env using the resolved backend_url, so they track port-conflict reassignment. - Dockerfile: drop the duplicated, buggy per-var heredocs (one read the wrong key `auth_enabled` instead of `enabled`, leaving the proxy auth gate always off); the export_runtime_settings_to_env eval now provides both. Add them to the env-unset list for hygiene. - Update the two placeholder tests to assert the new proxy-based design instead of the removed build-time sed mechanism; add DEEPTUTOR_* coverage in test_runtime_settings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>