Skip to content

LABEL_STUDIO_HOST environment variable is not respected in all places #9652

@thomasquandago

Description

@thomasquandago

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:

Expected behavior
I would expect the requests to be sent to:

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"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions