Skip to content

Commit

Permalink
Change the hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
ISNing authored Jul 14, 2024
1 parent aa61ad5 commit cf6f3f7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ addEventListener("fetch", (event) => {
event.respondWith(handleRequest(event.request));
});

const domainPostfix = ".ccsn.dev";
const dockerHub = "https://registry-1.docker.io";

const routes = {
// production
"docker.libcuda.so": dockerHub,
"quay.libcuda.so": "https://quay.io",
"gcr.libcuda.so": "https://gcr.io",
"k8s-gcr.libcuda.so": "https://k8s.gcr.io",
"k8s.libcuda.so": "https://registry.k8s.io",
"ghcr.libcuda.so": "https://ghcr.io",
"cloudsmith.libcuda.so": "https://docker.cloudsmith.io",
"ecr.libcuda.so": "https://public.ecr.aws",

// staging
"docker-staging.libcuda.so": dockerHub,
"docker" + domainPostfix: dockerHub,
"quay" + domainPostfix: "https://quay.io",
"gcr" + domainPostfix: "https://gcr.io",
"k8s-gcr" + domainPostfix: "https://k8s.gcr.io",
"k8s" + domainPostfix: "https://registry.k8s.io",
"ghcr" + domainPostfix: "https://ghcr.io",
"cloudsmith" + domainPostfix: "https://docker.cloudsmith.io",
"ecr" + domainPostfix: "https://public.ecr.aws",
};

function routeByHosts(host) {
Expand Down

0 comments on commit cf6f3f7

Please sign in to comment.