mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-28 14:26:24 +02:00
Add option to disable following redirects (#237)
When redirects are followed, ensure that they are still allowed per AllowHosts/DenyHosts
This commit is contained in:
parent
32a8bea35f
commit
52f4360543
2 changed files with 22 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ var allowHosts = flag.String("allowHosts", "", "comma separated list of allowed
|
|||
var denyHosts = flag.String("denyHosts", "", "comma separated list of denied remote hosts")
|
||||
var referrers = flag.String("referrers", "", "comma separated list of allowed referring hosts")
|
||||
var includeReferer = flag.Bool("includeReferer", false, "include referer header in remote requests")
|
||||
var followRedirects = flag.Bool("followRedirects", true, "follow redirects")
|
||||
var baseURL = flag.String("baseURL", "", "default base URL for relative remote URLs")
|
||||
var cache tieredCache
|
||||
var signatureKeys signatureKeyList
|
||||
|
|
@ -90,6 +91,7 @@ func main() {
|
|||
}
|
||||
|
||||
p.IncludeReferer = *includeReferer
|
||||
p.FollowRedirects = *followRedirects
|
||||
p.Timeout = *timeout
|
||||
p.ScaleUp = *scaleUp
|
||||
p.Verbose = *verbose
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue