Spaces:
Paused
Paused
BPEL Bot commited on
Commit ·
a127b8d
1
Parent(s): fc43080
entrypoint: trust proxy forwarded headers
Browse files- docker-entrypoint.sh +6 -0
docker-entrypoint.sh
CHANGED
|
@@ -47,6 +47,12 @@ cd "$RUNTIME_DIR"
|
|
| 47 |
log "Working directory: $(pwd)"
|
| 48 |
touch db.sqlite3 || true
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
log "Starting oTree services on 0.0.0.0:${PORT_VALUE}"
|
| 51 |
export PORT="$PORT_VALUE"
|
| 52 |
python scripts/check_db_connectivity.py || true
|
|
|
|
| 47 |
log "Working directory: $(pwd)"
|
| 48 |
touch db.sqlite3 || true
|
| 49 |
|
| 50 |
+
# Ensure uvicorn trusts the Hugging Face proxy so X-Forwarded-Proto gets respected.
|
| 51 |
+
if [[ -z "${FORWARDED_ALLOW_IPS:-}" ]]; then
|
| 52 |
+
export FORWARDED_ALLOW_IPS="*"
|
| 53 |
+
log "FORWARDED_ALLOW_IPS not provided; defaulting to '*'"
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
log "Starting oTree services on 0.0.0.0:${PORT_VALUE}"
|
| 57 |
export PORT="$PORT_VALUE"
|
| 58 |
python scripts/check_db_connectivity.py || true
|