05d35c904b
When WeKnora is mounted under a sub-path (Kubernetes Ingress with a
path-prefix rule, an Nginx `location /weknora/` block, a Cloudflare
Tunnel route, or any other reverse-proxy gateway), the frontend's
`getApiBaseUrl()` currently returns `''` and axios issues `/api/v1/...`
requests at the origin root — bypassing the sub-path entirely and
404'ing every backend call.
This change makes `getApiBaseUrl()` honor Vite's
`import.meta.env.BASE_URL` so that, when the bundle was built with e.g.
`vite build --base /weknora/`, axios produces `/weknora/api/v1/...`.
Trailing-slash stripped to avoid double slashes (`/weknora//api/v1/...`).
For deployments at the origin root (the common case), `BASE_URL`
defaults to `'/'` which strips to `''` — behavior unchanged from
upstream. No new build flag required; no behavior change for existing
users.
Reproduce the original problem:
1. cd frontend && vite build --base /weknora/
2. Serve dist/ behind Nginx at `location /weknora/`, proxy
/weknora/api/* → backend.
3. Open https://example.com/weknora/ → 404 on every API request
because axios calls /api/v1/auth/test instead of
/weknora/api/v1/auth/test.
After the fix the same setup just works.