diff options
-rwxr-xr-x | run-gomf.bash | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/run-gomf.bash b/run-gomf.bash index 7016c50..c8acce7 100755 --- a/run-gomf.bash +++ b/run-gomf.bash @@ -170,6 +170,12 @@ set -e # Used to obfuscate entries when LOG_*_HASH option is enabled for privacy. #LOG_HASH_SALT='put some unique string here' +# Count of trusted reverse proxies +# +# Used to determine which, if any, X-Forwarded-For or X-Real-IP to trust when +# logging or hashing the uploaders' IP addresses +#PROXY_COUNT=0 + ############################################################################### flags=() @@ -206,6 +212,7 @@ IFS="$oldifs" [ "${LOG_REFERER:-0}" -ne 0 ] && flags+=(--log-referer) [ "${LOG_REFERER_HASH:-0}" -ne 0 ] && flags+=(--log-referer-hash) [ -n "$LOG_HASH_SALT" ] && flags+=(--log-hash-salt "$LOG_HASH_SALT") +[ -n "$PROXY_COUNT" ] && flags+=(--proxy-count "$PROXY_COUNT") printf "%s" "${GOMF_BIN:-gomf}" [ "${#flags}" -gt 0 ] && printf " \"%s\"" "${flags[@]}" |