mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Cleaned up some variable names
This commit is contained in:
parent
4fc6db49ca
commit
0c6f7dbee1
@ -111,11 +111,11 @@ export async function servicesFromDocker() {
|
|||||||
function getUrlFromIngress(ingress) {
|
function getUrlFromIngress(ingress) {
|
||||||
let url = ingress.metadata.annotations['homepage/url'];
|
let url = ingress.metadata.annotations['homepage/url'];
|
||||||
if(!url) {
|
if(!url) {
|
||||||
const host = ingress.spec.rules[0].host;
|
const urlHost = ingress.spec.rules[0].host;
|
||||||
const path = ingress.spec.rules[0].http.paths[0].path;
|
const urlPath = ingress.spec.rules[0].http.paths[0].path;
|
||||||
const schema = ingress.spec.tls ? 'https' : 'http';
|
const urlSchema = ingress.spec.tls ? 'https' : 'http';
|
||||||
|
|
||||||
url = `${schema}://${host}${path}`;
|
url = `${urlSchema}://${urlHost}${urlPath}`;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user