diff --git a/src/index.js b/src/index.js index 0589ec5..cd961aa 100644 --- a/src/index.js +++ b/src/index.js @@ -83,7 +83,10 @@ async function handleRequest(request, env, ctx) { if (!response) { // Handle Docker authentication explicitly - if (isDocker && (url.pathname === '/v2/auth' || /^\/cr\/[^/]+\/v2\/auth\/?$/.test(url.pathname))) { + if ( + isDocker && + (url.pathname === '/v2/auth' || /^\/cr\/[^/]+\/v2\/auth\/?$/.test(url.pathname)) + ) { response = await handleDockerAuth(request, url, config); } else { // Platform detection using transform patterns diff --git a/test/unit/protocols.test.js b/test/unit/protocols.test.js index a7c22a6..ff5d89e 100644 --- a/test/unit/protocols.test.js +++ b/test/unit/protocols.test.js @@ -46,7 +46,8 @@ describe('Docker Authentication', () => { return new Response('', { status: 401, headers: { - 'WWW-Authenticate': 'Bearer realm="https://auth.docker.io/token",service="registry.docker.io"' + 'WWW-Authenticate': + 'Bearer realm="https://auth.docker.io/token",service="registry.docker.io"' } }); }