deploy: enforce no-cache for index.html and version.js via publish-dir htaccess
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user