HumanSignal / HumanSignal/label-studio
LABEL_STUDIO_HOST environment variable is not respected in all places
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
We are hosting Label Studio on our own domain with a base path, for example: `https://example.com/basepath/`. This works really well. There are two files, and one endpoint which does not respect the base path.
**To Reproduce**
Steps to reproduce the behavior:
1. Login to Label Studio
2. Open the inspector and go to network tab
3. Go to the home page `/` and refresh.
4. You will see that the following http requests do not respect the base path:
- GET https://example.com/static/fonts/Figtree-Regular.ttf
- GET https://example.com/static/fonts/Figtree-SemiBold.ttf
- GET https://example.com/heidi-tips
**Expected behavior**
I would expect the requests to be sent to:
- GET https://example.com/basepath/static/fonts/Figtree-Regular.ttf
- GET https://example.com/basepath/static/fonts/Figtree-SemiBold.ttf
- GET https://example.com/basepath/heidi-tips
This does work for the Favicon for example, which is correctly sent to:
`/basepath/static/images/favicon.8992b8aa4126.ico`
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
- OS: Windows + Firefox. Label studio is hosted on Linux via ECS.
- Label Studio Version Tested `1.22.0` and `1.23.0`
**Additional context**
Snippet from terraform. These values are set as environment variables.
```
environment_variables = {
LABEL_STUDIO_HOST = "https://example.com/basepath"
CSRF_TRUSTED_ORIGINS = "https://example.com/"
LABEL_STUDIO_DATABASE = "postgresql"
DJANGO_DB = "default"
POSTGRE_NAME = local.operable_label_studio_database
POSTGRE_HOST = ""
POSTGRE_PASSWORD = ""
POSTGRE_PORT = ""
LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK = "true"
}
```
Contributor guide
Assessment
This issue has not been assessed yet.