agentscope-ai / agentscope-ai/QwenPaw

[Bug]: support configurable base path

Offen
#1,853 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
34.9k
Forks
3.1k
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
225

Beschreibung

## CoPaw Version

`0.0.7.post1`

## Description

When CoPaw is exposed behind a reverse proxy under a URL prefix such as `/copaw/test-001`, the console frontend, static assets, and backend SPA/static serving behavior can become inconsistent. In practice this can lead to broken navigation, missing assets, and refresh/fallback failures.

From checking the current codebase, this is not only a `console/` frontend problem. The backend still mounts and serves the console from root-level paths such as `/`, `/assets`, and a root-level SPA fallback, so CoPaw still lacks full application-level support for prefixed deployments.

**Related PR(s):** #1259

**Security considerations:** None directly, but this affects private/self-hosted deployments behind enterprise reverse proxies and internal gateways.

## Component(s) Affected

- [x] Core / Backend (app, agents, config, providers, utils, local_models)
- [x] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [x] Scripts / Deploy

## Environment

- **CoPaw version:** `0.0.7.post1` (`c4dd5f1cabd8f73fafc7d7d4dd7089e9822c709a`)
- **OS:** Linux host behind reverse proxy / gateway
- **Install method:** Docker or from source behind reverse proxy
- **Python version (if applicable):** 3.10+

## Steps to Reproduce

1. Start a CoPaw instance.
2. Expose it behind a reverse proxy under a sub-path such as `/copaw/test-001`.
3. Open `https://example.com/copaw/test-001`.
4. Navigate between pages and refresh the page.
5. Check browser requests for assets and route behavior.

## Actual vs Expected

- **Actual:**
CoPaw still behaves as if it is mounted at `/`. Frontend navigation may jump to root-level routes such as `/chat`, assets may be requested from `/assets/...` instead of `/copaw/test-001/assets/...`, and refresh / SPA fallback behavior can fail under the prefixed path.
- **Expected:**
CoPaw should support a unified deployment prefix, for example `COPAW_BASE_PATH=/copaw/test-001`, and consistently apply it across frontend routing, asset URLs, backend static mounting, and SPA fallback behavior.

## Logs / Screenshots

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.