-
Notifications
You must be signed in to change notification settings - Fork 266
Description
Description:
The docker/config.py configuration file does not properly apply the FORCE_SCRIPT_NAME variable to the API endpoint configuration, making it impossible to serve Taiga API under a non-root URL path.
Current Behavior:
In docker/config.py, the FORCE_SCRIPT_NAME variable is read from the TAIGA_SUBPATH environment variable:
FORCE_SCRIPT_NAME = os.getenv('TAIGA_SUBPATH', '')
TAIGA_URL = f"{ TAIGA_SITES_SCHEME }://{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }"
SITES = {
"api": { "name": "api", "scheme": TAIGA_SITES_SCHEME, "domain": TAIGA_SITES_DOMAIN },
"front": { "name": "front", "scheme": TAIGA_SITES_SCHEME, "domain": f"{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }" }
}
The variable FORCE_SCRIPT_NAME is only applied to the "front" entry in the SITES dictionary, but NOT to the "api" entry.
Expected Behavior:
Both "api" and "front" entries should include FORCE_SCRIPT_NAME in their domain configuration:
SITES = {
"api": { "name": "api", "scheme": TAIGA_SITES_SCHEME, "domain": f"{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }" },
"front": { "name": "front", "scheme": TAIGA_SITES_SCHEME, "domain": f"{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }" }
}
Impact:
When setting TAIGA_SUBPATH=/taiga, the API continues to be configured with only the base domain (e.g., mycompany.com) instead of the complete path (e.g., mycompany.com/taiga). This causes:
Incorrect internal URL generation for API references
Frontend misconfiguration when trying to reference API endpoints
Inability to deploy Taiga behind a reverse proxy at a non-root path
Inconsistency between frontend and backend path configuration
Steps to Reproduce:
Set environment variables:
TAIGA_SITES_DOMAIN=mycompany.com
TAIGA_SUBPATH=/taiga
Start taiga-back container with these variables
Check the SITES configuration in logs/debug
Expected Result:
API domain should be: mycompany.com/taiga
Actual Result:
API domain is: mycompany.com (missing the /taiga path)
Frontend domain is: mycompany.com/taiga (correct)
Environment:
Taiga Backend version: latest (docker image)
Docker/Docker Compose: Yes
Installation method: Docker image taigaio/taiga-back
Configuration method: Environment variables
Related Issues:
This prevents proper deployment of Taiga in environments where:
Multiple applications share the same domain (multi-tenant SaaS)
Reverse proxy URL rewriting is required
Kubernetes Ingress with path-based routing is used