Making sure URLs are always lower-case.
This commit is contained in:
parent
cfe3c6e3d2
commit
d820e3287e
|
@ -43,7 +43,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkUrl(url) {
|
async function checkUrl(url) {
|
||||||
urlError = await checkValidation({ url }, urlValidation)
|
urlError = await checkValidation({ url: url.toLowerCase() }, urlValidation)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
|
|
@ -72,7 +72,7 @@ async function getAppUrlIfNotInUse(ctx) {
|
||||||
} else {
|
} else {
|
||||||
url = encodeURI(`${ctx.request.body.name}`)
|
url = encodeURI(`${ctx.request.body.name}`)
|
||||||
}
|
}
|
||||||
url = `/${url.replace(/\/|\\/g, "")}`
|
url = `/${url.replace(/\/|\\/g, "")}`.toLowerCase()
|
||||||
const hostingInfo = await getHostingInfo()
|
const hostingInfo = await getHostingInfo()
|
||||||
if (hostingInfo.type === HostingTypes.CLOUD) {
|
if (hostingInfo.type === HostingTypes.CLOUD) {
|
||||||
return url
|
return url
|
||||||
|
|
|
@ -29,7 +29,7 @@ function objectStoreUrl() {
|
||||||
|
|
||||||
async function checkForSelfHostedURL(ctx) {
|
async function checkForSelfHostedURL(ctx) {
|
||||||
// the "appId" component of the URL may actually be a specific self hosted URL
|
// the "appId" component of the URL may actually be a specific self hosted URL
|
||||||
let possibleAppUrl = `/${encodeURI(ctx.params.appId)}`
|
let possibleAppUrl = `/${encodeURI(ctx.params.appId).toLowerCase()}`
|
||||||
const apps = await getDeployedApps()
|
const apps = await getDeployedApps()
|
||||||
if (apps[possibleAppUrl] && apps[possibleAppUrl].appId) {
|
if (apps[possibleAppUrl] && apps[possibleAppUrl].appId) {
|
||||||
return apps[possibleAppUrl].appId
|
return apps[possibleAppUrl].appId
|
||||||
|
|
Loading…
Reference in New Issue