Skip to content

fix(cli): preserve remote backend routing for webui access#180

Merged
duguwanglong merged 2 commits into
mainfrom
fix/remote-webui-backend-routing
Apr 24, 2026
Merged

fix(cli): preserve remote backend routing for webui access#180
duguwanglong merged 2 commits into
mainfrom
fix/remote-webui-backend-routing

Conversation

@xiami762

Copy link
Copy Markdown
Contributor

Summary

  • keep remote backend hosts reachable by injecting direct WebUI API and websocket URLs only for concrete non-local backend hosts
  • merge runtime CORS origins inferred from CLI startup with configured allowlists instead of letting config override runtime access
  • add regression tests covering backend env injection, loopback proxy preservation, and CORS origin merging

Test plan

  • uv run pytest tests/cli/test_service_manager.py tests/server/test_app_cors.py -q
  • Manual verification: flocks start --server-host <remote-ip> --webui-host <remote-ip> and open from another machine
  • Manual verification: localhost proxy mode still works with 127.0.0.1

Made with Cursor

xiami762 added 2 commits April 24, 2026 09:37
Keep concrete remote backend hosts reachable from the WebUI while preserving localhost proxy behavior, and merge runtime CORS origins with configured allowlists to avoid regressions.

Made-with: Cursor
- Remove _FLOCKS_SERVER_* from backend subprocess env; rely on WebUI origin for CORS
- Add IPv6 literal bracketing when composing backend base URL and CORS origins
- Narrow windows-packaging workflow path triggers
- Extend tests for IPv6 and updated CORS/service_manager behavior

Made-with: Cursor
@xiami762 xiami762 requested a review from duguwanglong April 24, 2026 07:25
@duguwanglong duguwanglong merged commit 351b7a7 into main Apr 24, 2026
2 checks passed
duguwanglong pushed a commit to DearEmma/flocks that referenced this pull request May 18, 2026
…ks#180)

* fix(cli): preserve remote backend routing for webui access

Keep concrete remote backend hosts reachable from the WebUI while preserving localhost proxy behavior, and merge runtime CORS origins with configured allowlists to avoid regressions.

* fix(cli,server): bracket IPv6 in URLs and simplify CORS runtime origins

- Remove _FLOCKS_SERVER_* from backend subprocess env; rely on WebUI origin for CORS
- Add IPv6 literal bracketing when composing backend base URL and CORS origins
- Narrow windows-packaging workflow path triggers
- Extend tests for IPv6 and updated CORS/service_manager behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants