diff --git a/src/web/app/common/scripts/config.js b/src/web/app/common/scripts/config.js index e44e174a9..4203431bd 100644 --- a/src/web/app/common/scripts/config.js +++ b/src/web/app/common/scripts/config.js @@ -1,9 +1,10 @@ -const url = new URL(location.href); +const Url = new URL(location.href); -const isRoot = url.host.split('.')[0] == 'misskey'; +const isRoot = Url.host.split('.')[0] == 'misskey'; -const host = isRoot ? url.host : url.host.substring(url.host.indexOf('.') + 1, url.host.length); -const scheme = url.protocol; +const host = isRoot ? Url.host : Url.host.substring(Url.host.indexOf('.') + 1, Url.host.length); +const scheme = Url.protocol; +const url = `${scheme}//${host}`; const apiUrl = `${scheme}//api.${host}`; const devUrl = `${scheme}//dev.${host}`; const aboutUrl = `${scheme}//about.${host}`; @@ -11,6 +12,7 @@ const aboutUrl = `${scheme}//about.${host}`; module.exports = { host, scheme, + url, apiUrl, devUrl, aboutUrl