fix: Otherfqdns
This commit is contained in:
parent
c63430e342
commit
f71b54deb2
@ -38,7 +38,7 @@
|
|||||||
try {
|
try {
|
||||||
await post(`/services/${id}/check.json`, {
|
await post(`/services/${id}/check.json`, {
|
||||||
fqdn: service.fqdn,
|
fqdn: service.fqdn,
|
||||||
otherFqdns: [service.minio.apiFqdn],
|
otherFqdns: service.minio?.apiFqdn ? [service.minio?.apiFqdn] : [],
|
||||||
exposePort: service.exposePort
|
exposePort: service.exposePort
|
||||||
});
|
});
|
||||||
await post(`/services/${id}/${service.type}.json`, { ...service });
|
await post(`/services/${id}/${service.type}.json`, { ...service });
|
||||||
|
@ -13,7 +13,7 @@ export const post: RequestHandler = async (event) => {
|
|||||||
let { fqdn, exposePort, otherFqdns } = await event.request.json();
|
let { fqdn, exposePort, otherFqdns } = await event.request.json();
|
||||||
|
|
||||||
if (fqdn) fqdn = fqdn.toLowerCase();
|
if (fqdn) fqdn = fqdn.toLowerCase();
|
||||||
if (otherFqdns) otherFqdns = otherFqdns.map((fqdn) => fqdn.toLowerCase());
|
if (otherFqdns && otherFqdns.length > 0) otherFqdns = otherFqdns.map((f) => f.toLowerCase());
|
||||||
if (exposePort) exposePort = Number(exposePort);
|
if (exposePort) exposePort = Number(exposePort);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -25,7 +25,7 @@ export const post: RequestHandler = async (event) => {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (otherFqdns) {
|
if (otherFqdns && otherFqdns.length > 0) {
|
||||||
for (const ofqdn of otherFqdns) {
|
for (const ofqdn of otherFqdns) {
|
||||||
const domain = getDomain(ofqdn);
|
const domain = getDomain(ofqdn);
|
||||||
const nakedDomain = domain.replace('www.', '');
|
const nakedDomain = domain.replace('www.', '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user