fix non images always show notifications, add override domain, fix headers

This commit is contained in:
creations 2025-05-18 12:09:41 -04:00
parent 270d531d6e
commit 6040cb0142
Signed by: creations
GPG key ID: 8F553AA4320FC711
3 changed files with 35 additions and 10 deletions

View file

@ -123,6 +123,24 @@ setup_domain() {
done
if [[ "$change_options" =~ ^(y|Y)$ ]]; then
while true; do
echo -ne "${CYAN}Enter override domain for accessing files (e.g. random.domain.com): ${RESET}"
read override_domain
if [[ -z "$override_domain" ]]; then
echo -e "${YELLOW}No override domain set.${RESET}"
break
fi
if [[ "$override_domain" =~ ^[a-zA-Z0-9.-]+$ ]]; then
set_value "x-zipline-domain" "$override_domain"
echo -e "${GREEN}x-zipline-domain set to: $override_domain${RESET}"
break
else
echo -e "${YELLOW}Invalid format. Must be like: domain.tld (no https, no trailing slash). Try again or press Enter to skip.${RESET}"
fi
done
echo -ne "${CYAN}Enter the number of max views (default: 0): ${RESET}"
read max_views
while [[ -n "$max_views" && ! "$max_views" =~ ^[0-9]+$ ]]; do

View file

@ -25,6 +25,7 @@ declare -A ALLOWED_KEYS=(
["x-zipline-image-compression-percent"]="^.+$"
["x-zipline-original-name"]="^.+$"
["x-zipline-format"]="^.+$"
["x-zipline-domain"]="^.+$"
)
REQUIRED_KEYS=(