Skip to content

Commit

Permalink
fix(domais): change rule to create wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos authored Sep 17, 2024
1 parent aa8b995 commit 21cd12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/domains-api/src/etcd-db/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const createWildcard = async (routerName: string, domainName: string): Pr
// Configure routers
await etcdClient.put(`traefik/http/routers/${routerName}/tls`).value('true');
await etcdClient.put(`traefik/http/routers/${routerName}/tls/certresolver`).value('myresolver');
await etcdClient.put(`traefik/http/routers/${routerName}/rule`).value(`HostRegexp(\`${domainName}\`, \`{subdomain:.+}.${domainName}\`)`);
await etcdClient.put(`traefik/http/routers/${routerName}/rule`).value(`Host(\`${domainName}\`) || HostRegexp(\`{subdomain:.+}.${domainName}\`)`);
await etcdClient.put(`traefik/http/routers/${routerName}/tls/domains/0/main`).value(domainName);
await etcdClient.put(`traefik/http/routers/${routerName}/tls/domains/0/sans/0`).value(`*.${domainName}`);
await etcdClient.put(`traefik/http/routers/${routerName}/service`).value('public@docker');
Expand Down Expand Up @@ -56,4 +56,4 @@ export const getRouters = async (id: number, domain: string): Promise<[string |

logger.child({ routerName, wildcard: value, routers, values }).info('getRouters');
return [value, routers];
}
}

0 comments on commit 21cd12a

Please sign in to comment.