summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-11-15 20:41:50 +0100
committerclsr <clsr@clsr.net>2016-11-15 20:41:50 +0100
commit0b216fe7a35a3d0e19bcbfb96019cd0fe5829b64 (patch)
treedc0470b81dfde0b291e2a5d6fcb728d158e0671c
parentd9c053790e8ef199161654a843aa2e631431dc58 (diff)
downloadgomf-tools-0b216fe7a35a3d0e19bcbfb96019cd0fe5829b64.tar.gz
gomf-tools-0b216fe7a35a3d0e19bcbfb96019cd0fe5829b64.zip
Update run-gomf.bash for gomf-0.5.1
-rwxr-xr-xrun-gomf.bash7
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[@]}"