From 1f2f02e6ee19cd50a6a615419481b37c244d2f48 Mon Sep 17 00:00:00 2001 From: EyePulp Date: Fri, 26 Jan 2024 16:56:21 -0600 Subject: [PATCH] #422 readme/usage docs improvement --- README.md | 2 +- imaginary.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ef1df843..9b9b5c05 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ Options: -enable-placeholder Enable image response placeholder to be used in case of error [default: false] -enable-auth-forwarding Forwards X-Forward-Authorization or Authorization header to the image source server. -enable-url-source flag must be defined. Tip: secure your server from public access to prevent attack vectors -forward-headers Forwards custom headers to the image source server. -enable-url-source flag must be defined. - -source-response-headers Returns selected headers from the source image server response. Has precedence over -http-cache-ttl when cache-control is specified. Missing headers are ignored. -enable-url-source flag must be defined. + -source-response-headers Returns selected headers from the source image server response. Has precedence over -http-cache-ttl when cache-control is specified and the source response has a cache-control header, otherwise falls back to -http-cache-ttl value if provided. Missing and/or unlisted response headers are ignored. -enable-url-source flag must be defined. -enable-url-signature Enable URL signature (URL-safe Base64-encoded HMAC digest) [default: false] -url-signature-key The URL signature key (32 characters minimum) -allowed-origins Restrict remote image source processing to certain origins (separated by commas). Note: Origins are validated against host *AND* path. diff --git a/imaginary.go b/imaginary.go index b78c9308..e893b99d 100644 --- a/imaginary.go +++ b/imaginary.go @@ -40,7 +40,7 @@ var ( aKeyFile = flag.String("keyfile", "", "TLS private key file path") aAuthorization = flag.String("authorization", "", "Defines a constant Authorization header value passed to all the image source servers. -enable-url-source flag must be defined. This overwrites authorization headers forwarding behavior via X-Forward-Authorization") aForwardHeaders = flag.String("forward-headers", "", "Forwards custom headers to the image source server. -enable-url-source flag must be defined.") - aSrcResponseHeaders = flag.String("source-response-headers", "", "Returns selected headers from the source image server response. Has precedence over -http-cache-ttl when cache-control is specified. -enable-url-source flag must be defined.") + aSrcResponseHeaders = flag.String("source-response-headers", "", "Returns selected headers from the source image server response. Has precedence over -http-cache-ttl when cache-control is specified and the source response has a cache-control header, otherwise falls back to -http-cache-ttl value if provided. Missing and/or unlisted response headers are ignored. -enable-url-source flag must be defined.") aPlaceholder = flag.String("placeholder", "", "Image path to image custom placeholder to be used in case of error. Recommended minimum image size is: 1200x1200") aPlaceholderStatus = flag.Int("placeholder-status", 0, "HTTP status returned when use -placeholder flag") aDisableEndpoints = flag.String("disable-endpoints", "", "Comma separated endpoints to disable. E.g: form,crop,rotate,health")