diff --git a/src/handler.ts b/src/handler.ts index 6504e7b..30ea89b 100644 --- a/src/handler.ts +++ b/src/handler.ts @@ -1,168 +1,3 @@ -function getHomePageHtml(): string { - return ` - - - CZL Docker镜像服务 - - - - -
-

快捷命令

-
- 提示,支持docker.io, ghcr,quay,k8sgcr,gcr, 非docker.io需加上域名前缀 -
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- - - - `; -} - import { TokenProvider } from './token' import { Backend } from './backend' @@ -183,14 +18,18 @@ export async function handleRequest(request: Request): Promise { const url = new URL(request.url) if (url.pathname === '/') { - return new Response(getHomePageHtml(), { - headers: { 'content-type': 'text/html;charset=UTF-8' }, + return new Response(null, { + status: 301, + headers: { + 'Location': 'https://onepage.czl.net/tools/docker_mirror.html' + } }) } return handleRegistryRequest(request) } + function copyProxyHeaders(inputHeaders: Headers): Headers { const headers = new Headers; for (const pair of inputHeaders.entries()) { diff --git a/参考.html b/参考.html new file mode 100644 index 0000000..3137987 --- /dev/null +++ b/参考.html @@ -0,0 +1,183 @@ + + + + CZL Docker镜像服务 + + + + + + + + + + + + + +
+

快捷命令

+
+ 提示,支持docker.io, ghcr,quay,k8sgcr,gcr, 非docker.io需加上域名前缀
+ 例如:woodchen/simplemirrorfetch
gcr.io/woodchen/simplemirrorfetch
quay.io/woodchen/simplemirrorfetch
+ ghcr.io/woodchen/simplemirrorfetch
k8s.gcr.io/woodchen/simplemirrorfetch +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ + + + + \ No newline at end of file