Amend CORS

This commit is contained in:
2025-07-15 16:15:10 +02:00
parent edeffa7012
commit 9148bb3463
5 changed files with 55 additions and 18 deletions

View File

@@ -4,10 +4,16 @@ set -e
# Create runtime config file in writable location
cat > /runtime-config/config.js <<EOF
window.__APP_CONFIG__ = {
API_BASE_URL: "${API_BASE_URL}",
OTHER_VAR: "${OTHER_VAR}"
API_BASE_URL: "${API_BASE_URL}"
};
EOF
# Generate nginx config from template (if using)
if [ -f "/etc/nginx/templates/nginx.conf.template" ]; then
envsubst '${API_BASE_URL}' \
< /etc/nginx/templates/nginx.conf.template \
> /etc/nginx/nginx.conf
fi
# Start Nginx
exec nginx -g "daemon off;"