summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.template.ejs2
-rw-r--r--src/store/app.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/index.template.ejs b/src/index.template.ejs
index 22b2abc..5fbc28b 100644
--- a/src/index.template.ejs
+++ b/src/index.template.ejs
@@ -13,6 +13,6 @@
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
- <div id="app"></div>
+ <div id="app" data-base-url="http://127.0.0.1:9090"></div>
</body>
</html>
diff --git a/src/store/app.ts b/src/store/app.ts
index 4c7a796..d1daeeb 100644
--- a/src/store/app.ts
+++ b/src/store/app.ts
@@ -160,7 +160,7 @@ export function updateCollapsibleIsOpen(
}
const defaultClashAPIConfig = {
- baseURL: 'http://127.0.0.1:9090',
+ baseURL: document.getElementById('app')?.getAttribute('data-base-url') ?? 'http://127.0.0.1:9090',
secret: '',
addedAt: 0,
};