HumanSignal / HumanSignal/label-studio
URLs With “Next” Parameter Use Base URL Instead of Sub Path
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
When running label-studio on a sub path, the URLs with "next" parameter use the base URL instead of the full URL including the sub path.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a `docker-compose.yml` file with content:
```yaml
version: "3.9"
services:
nginx:
image: dockerregistry-v2.vih.infineon.com/heartexlabs/label-studio:1.8.0
ports:
- "8085:8085"
- "8086:8086"
command: nginx
environment:
- LABEL_STUDIO_HOST=http://localhost:8085/label-studio
app:
image: dockerregistry-v2.vih.infineon.com/heartexlabs/label-studio:1.8.0
expose:
- "8000"
command: label-studio-uwsgi
environment:
- LABEL_STUDIO_HOST=http://localhost:8085/label-studio
```
2. Run `docker compose up`
3. Navigate to `http://localhost:8085/label-studio/projects/` in the browser while not logged in
4. You get redirected to `http://localhost:8085/?next=/label-studio/projects/`, which shows an nginx 404 not found error.
**Expected behavior**
1. Navigate to `http://localhost:8085/label-studio/projects/` in the browser while not logged in
2. Redirect goes to `http://localhost:8085/label-studio/?next=/projects/`
**Screenshots**

**Environment (please complete the following information):**
- OS: Ubuntu (WSL)
- Label Studio Version: 1.8.0
Contributor guide
Assessment
This issue has not been assessed yet.