mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
483c869920
fix: metrics authorization middleware bleed (#3182) Fixes `extension_metrics_disabled.go` to correctly isolate the authz middleware when the metrics extension is disabled. Signed-off-by: Matthieu Mottet <m.mottet@outlook.com>
7 lines
214 B
Bash
7 lines
214 B
Bash
function dist_route_check () {
|
|
local servername="http://127.0.0.1:${1}/v2/"
|
|
status_code=$(curl --write-out '%{http_code}' ${2} --silent --output /dev/null ${servername})
|
|
|
|
[ "$status_code" -eq ${3} ]
|
|
}
|