summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-gomf.bash35
1 files changed, 35 insertions, 0 deletions
diff --git a/run-gomf.bash b/run-gomf.bash
index 05146cf..7016c50 100755
--- a/run-gomf.bash
+++ b/run-gomf.bash
@@ -142,6 +142,33 @@ set -e
# application/x-msdos-program
#)
+# Enable logging
+#
+# When set to 1, all uploads are logged to $GOMF_ROOT/log/.
+#LOG=0
+
+# Enable logging of IP addresses
+#LOG_IP=0
+
+# Enable logging of hashed IP addresses
+#LOG_IP_HASH=0
+
+# Enable logging of User-Agent headers
+#LOG_UA=0
+
+# Enable logging of hashed User-Agent headers
+#LOG_UA_HASH=0
+
+# Enable logging of Referer headers
+#LOG_REFERER=0
+
+# Enable logging of hashed Referer headers
+#LOG_REFERER_HASH=0
+
+# Salt for hashed log entries
+#
+# Used to obfuscate entries when LOG_*_HASH option is enabled for privacy.
+#LOG_HASH_SALT='put some unique string here'
###############################################################################
@@ -171,6 +198,14 @@ IFS="$oldifs"
[ "${GRILL:-0}" -ne 0 ] && flags+=(--grill)
[ -n "$CSP" ] && [ "$CSP" = 0 ] && flags+=(--csp '')
[ -n "$CSP" ] && ! [ "$CSP" = 0 ] && flags+=(--csp "$CSP")
+[ "${LOG:-0}" -ne 0 ] && flags+=(--log)
+[ "${LOG_IP:-0}" -ne 0 ] && flags+=(--log-ip)
+[ "${LOG_IP_HASH:-0}" -ne 0 ] && flags+=(--log-ip-hash)
+[ "${LOG_UA:-0}" -ne 0 ] && flags+=(--log-ua)
+[ "${LOG_UA_HASH:-0}" -ne 0 ] && flags+=(--log-ua-hash)
+[ "${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")
printf "%s" "${GOMF_BIN:-gomf}"
[ "${#flags}" -gt 0 ] && printf " \"%s\"" "${flags[@]}"