mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
[Client] Fix bug: Add missing config property (url)
This commit is contained in:
parent
781b3b24e1
commit
1858294632
@ -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 host = isRoot ? Url.host : Url.host.substring(Url.host.indexOf('.') + 1, Url.host.length);
|
||||||
const scheme = url.protocol;
|
const scheme = Url.protocol;
|
||||||
|
const url = `${scheme}//${host}`;
|
||||||
const apiUrl = `${scheme}//api.${host}`;
|
const apiUrl = `${scheme}//api.${host}`;
|
||||||
const devUrl = `${scheme}//dev.${host}`;
|
const devUrl = `${scheme}//dev.${host}`;
|
||||||
const aboutUrl = `${scheme}//about.${host}`;
|
const aboutUrl = `${scheme}//about.${host}`;
|
||||||
@ -11,6 +12,7 @@ const aboutUrl = `${scheme}//about.${host}`;
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
host,
|
host,
|
||||||
scheme,
|
scheme,
|
||||||
|
url,
|
||||||
apiUrl,
|
apiUrl,
|
||||||
devUrl,
|
devUrl,
|
||||||
aboutUrl
|
aboutUrl
|
||||||
|
Loading…
Reference in New Issue
Block a user