feat: JSON access log in the platform logging contract

This commit is contained in:
nholtware 2026-11-05 10:54:10 -06:00
parent 20b204da4d
commit 00de7c4d3d
5 changed files with 46 additions and 1 deletions

View file

@ -23,4 +23,12 @@ for name in $VARS; do
done
printf 'window.__APP_CONFIG__ = {%s};\n' "$body" > "$OUT"
echo "10-config.sh: wrote $OUT"
# nginx variables for the JSON access log (nginx/default.conf). Restricted
# charset: these land inside nginx string literals.
safe() { printf '%s' "$1" | tr -cd 'A-Za-z0-9._-'; }
cat > /etc/nginx/conf.d/service-vars.conf <<NGINX
map \$host \$app_name { default "$(safe "$APP_NAME")"; }
map \$host \$git_sha { default "$(safe "${GIT_SHA:-dev}")"; }
NGINX
echo "10-config.sh: wrote $OUT and service-vars.conf"