deploy: enforce no-cache for index.html and version.js via publish-dir htaccess

This commit is contained in:
Jage9
2026-02-22 19:08:20 -05:00
parent c7e2a10652
commit 590e33d374
3 changed files with 17 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ PUBLISH_DIR="${2:-/home/bestmidi/public_html/chgrid}"
BASE_PATH="${3:-/chgrid/}"
CLIENT_DIR="$REPO_ROOT/client"
PHP_PROXY_DIR="$REPO_ROOT/deploy/php"
PUBLIC_HTACCESS_SRC="$REPO_ROOT/deploy/apache/chgrid-public-htaccess"
if [[ ! -d "$CLIENT_DIR" ]]; then
echo "error: client directory not found: $CLIENT_DIR" >&2
@@ -28,6 +29,10 @@ if [[ -d "$PHP_PROXY_DIR" ]]; then
rsync -a "$PHP_PROXY_DIR/" "$PUBLISH_DIR/"
fi
if [[ -f "$PUBLIC_HTACCESS_SRC" ]]; then
cp "$PUBLIC_HTACCESS_SRC" "$PUBLISH_DIR/.htaccess"
fi
# Normalize publish permissions for restrictive shared-host PHP handlers.
# - Directories must be executable/traversable.
# - PHP/static files must not be group-writable.