mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-04-17 07:07:11 +02:00
Fix health command when path prefix is set
This commit is contained in:
parent
2ae2a539fe
commit
1d3706d56c
@ -15,9 +15,11 @@ import (
|
|||||||
func healthcheck() int {
|
func healthcheck() int {
|
||||||
network := config.Network
|
network := config.Network
|
||||||
bind := config.Bind
|
bind := config.Bind
|
||||||
|
pathprefix := config.PathPrefix
|
||||||
|
|
||||||
configurators.String(&network, "IMGPROXY_NETWORK")
|
configurators.String(&network, "IMGPROXY_NETWORK")
|
||||||
configurators.String(&bind, "IMGPROXY_BIND")
|
configurators.String(&bind, "IMGPROXY_BIND")
|
||||||
|
configurators.String(&pathprefix, "IMGPROXY_PATH_PREFIX")
|
||||||
|
|
||||||
httpc := http.Client{
|
httpc := http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
@ -27,7 +29,7 @@ func healthcheck() int {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := httpc.Get("http://imgproxy/health")
|
res, err := httpc.Get(fmt.Sprintf("http://imgproxy%s/health", pathprefix))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err.Error())
|
fmt.Fprintln(os.Stderr, err.Error())
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user