Only do auth checks for endpoints starting with v2
Only do auth checks for endpoints starting with v2

Changes behavior so ping doesn't happen if /v2/ is anywhere in a request path, but instead only at the beginning. This fixes attempts to ping on redirected URLs.

Signed-off-by: Derek McGowan <e1c79a582b6629e6b39e9679f4bb964d25db4aa8@mcgstyle.net> (github: dmcgowan)

thaJeztah/distribution,thaJeztah/distribution