DOMAIN_FROM_REQUEST=True is maybe inconsistent with HOSTNAME handling
is it me or is this code https://github.com/HumanSignal/label-studio/blob/develop/label_studio/core/settings/base.py#L111-112
clashes with this code just couple lines above https://github.com/HumanSignal/label-studio/blob/develop/label_studio/core/settings/base.py#L88-93 ?
My reading is that if DOMAIN_FROM_REQUEST=True
by the time line 111 get's executed, the line 92 or else clause on line 93 guarantee that 112 will raise an error.
So basically there's no configuration with DOMAIN_FROM_REQUEST=True that will not raise on L112.
Facing this as well, lines 107:114 should be moved above line 87
I guess somehow it doesn't make sense to the maintainers?
Could you please describe more details what settings are you trying to use? Have you tried to use something like LABEL_STUDIO_HOST=http://domain/subpath instead of LABEL_STUDIO_HOST=/subpath?
If you set LABEL_STUDIO_HOST=http://domain/subpath and DOMAIN_FROM_REQUEST=True, the result will be an exception because:
https://github.com/HumanSignal/label-studio/blob/39a92aef950cd2c6a8ac92a39b17b7e1716b52f9/label_studio/core/settings/base.py#L109-L112
If you set LABEL_STUDIO_HOST=/subpath and DOMAIN_FROM_REQUEST=True, it won't work either cause the variable LABEL_STUDIO_HOST will be reset to an empty string:
https://github.com/HumanSignal/label-studio/blob/39a92aef950cd2c6a8ac92a39b17b7e1716b52f9/label_studio/core/settings/base.py#L87-L92
I made a PR to address this but it has been closed: https://github.com/HumanSignal/label-studio/pull/5874