diff --git a/README.md b/README.md index 0080d4f..61ff57e 100644 --- a/README.md +++ b/README.md @@ -186,12 +186,12 @@ specify multiple hosts as a comma separated list, or prefix a host value with ### Allowed Hosts List ### You can limit the remote hosts that the proxy will fetch images from using the -`remoteHosts` flag. This is useful, for example, for locking the proxy down to +`allowHosts` flag. This is useful, for example, for locking the proxy down to your own hosts to prevent others from abusing it. Of course if you want to -support fetching from any host, leave off the remoteHosts flag. Try it out by +support fetching from any host, leave off the allowHosts flag. Try it out by running: - imageproxy -remoteHosts example.com + imageproxy -allowHosts example.com Reload the [codercat URL][], and you should now get an error message. You can specify multiple hosts as a comma separated list, or prefix a host value with diff --git a/etc/debian/etc-initd-imageproxy b/etc/debian/etc-initd-imageproxy index 73dbae6..5654511 100644 --- a/etc/debian/etc-initd-imageproxy +++ b/etc/debian/etc-initd-imageproxy @@ -29,7 +29,7 @@ case "$1" in test -n "$ADDR" && DAEMON_OPTS+=" -addr=$ADDR" test -n "$CACHE" && DAEMON_OPTS+=" -cache=$CACHE" test -n "$LOG_DIR" && DAEMON_OPTS+=" -log_dir=$LOG_DIR" - test -n "$ALLOWED_REMOTE_HOSTS" && DAEMON_OPTS+=" -remoteHosts=$ALLOWED_REMOTE_HOSTS" + test -n "$ALLOWED_REMOTE_HOSTS" && DAEMON_OPTS+=" -allowHosts=$ALLOWED_REMOTE_HOSTS" echo -n "Starting $NAME: " start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ diff --git a/etc/imageproxy.conf b/etc/imageproxy.conf index dae8466..ab3fb4a 100644 --- a/etc/imageproxy.conf +++ b/etc/imageproxy.conf @@ -11,4 +11,4 @@ exec start-stop-daemon --start -c www-data --exec /usr/bin/imageproxy -- \ -cache /var/cache/imageproxy \ -signatureKey @/etc/imageproxy.key \ -baseURL https://willnorris.com/ \ - -remoteHosts willnorris.com,notsoserendipitous.com,gabenorris.com + -allowHosts willnorris.com,notsoserendipitous.com,gabenorris.com diff --git a/etc/imageproxy.service b/etc/imageproxy.service index 5c4d5af..e95cf4d 100644 --- a/etc/imageproxy.service +++ b/etc/imageproxy.service @@ -9,7 +9,7 @@ ExecStart=/usr/local/bin/imageproxy \ -cache /var/cache/imageproxy \ -signatureKey @/etc/imageproxy.key \ -baseURL https://willnorris.com/ \ - -remoteHosts willnorris.com,notsoserendipitous.com,gabenorris.com + -allowHosts willnorris.com,notsoserendipitous.com,gabenorris.com Restart=on-abort [Install]