Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Argilla not working behind proxy (argilla-io#3543)
# Description This PR updates the URL in which the Argilla App is mounted to be `"/"`, as it's not required to change the URL of the server because the proxy will know what rewrite has to be done. In addition, the entrypoint scripts of both images have been updated to add the `--root-path $ARGILLA_BASE_URL` option to the `uvicorn` command if `ARGILLA_BASE_URL` env variable has been set. More info: [FastAPI - Behind a proxy](https://fastapi.tiangolo.com/advanced/behind-a-proxy/#behind-a-proxy). Closes argilla-io#3542 **Type of change** - [x] Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested** - [x] `localhost/argilla` load in a web browser and can connect using `rg.init` with an NGINX local setup: <details> <summary>Local Nginx</summary> `docker-compose.yaml`: ```yaml version: '3.8' services: argilla: image: argilla/argilla-quickstart:pr-3543 environment: ARGILLA_BASE_URL: /argilla LOAD_DATASETS: none ports: - 6900:6900 nginx: image: nginx:latest ports: - 80:80 volumes: - ./nginx.conf:/etc/nginx/nginx.conf ``` `nginx.conf`: ``` events {} http { server { listen 80; server_name your_server_name_or_ip; location /argilla/ { proxy_pass http://argilla:6900/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } } ``` </details> **Checklist** - [x] I followed the style guidelines of this project - [x] I did a self-review of my code - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK) (see text above) - [x] I have added relevant notes to the `CHANGELOG.md` file (See https://keepachangelog.com/)
- Loading branch information