Return regsitry version header

This commit is contained in:
ciiiii
2024-06-14 02:44:35 +08:00
parent 00b8c83650
commit 861a6a8bb1

View File

@@ -68,6 +68,7 @@ async function handleRequest(request) {
`Bearer realm="https://${url.hostname}/v2/auth",service="cloudflare-docker-proxy"`
);
}
headers.Set("Docker-Distribution-API-Version", "registry/2.0");
return new Response(JSON.stringify({ message: "UNAUTHORIZED" }), {
status: 401,
headers: headers,