well done
This commit is contained in:
parent
7203c176e8
commit
9820a691c1
12 changed files with 58 additions and 8 deletions
18
src/web/app/common/scripts/config.js
Normal file
18
src/web/app/common/scripts/config.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
const url = new URL(location.href);
|
||||
|
||||
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 apiUrl = `${scheme}//api.${host}`;
|
||||
const devUrl = `${scheme}//dev.${host}`;
|
||||
const aboutUrl = `${scheme}//about.${host}`;
|
||||
|
||||
module.exports = {
|
||||
host,
|
||||
scheme,
|
||||
apiUrl,
|
||||
devUrl,
|
||||
aboutUrl,
|
||||
themeColor: '#f76d6c'
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue