HumanSignal / HumanSignal/label-studio

URLs With “Next” Parameter Use Base URL Instead of Sub Path

Open
#4,520 5 comments 1 reaction 1 assignee Claimed by @makseq View on GitHub
community:needs-information community:reviewed
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**
![image](https://github.com/heartexlabs/label-studio/assets/39067132/d0fd93de-9b5e-4ad8-ac10-f347ce07dd50)

**Environment (please complete the following information):**
- OS: Ubuntu (WSL)
- Label Studio Version: 1.8.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.