feat: support customize baseURL

This commit is contained in:
hronro 2020-12-20 09:49:43 +08:00
parent 3b0cd7bd1e
commit ef17054d99
2 changed files with 2 additions and 2 deletions

View file

@ -13,6 +13,6 @@
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app" data-base-url="http://127.0.0.1:9090"></div>
</body> </body>
</html> </html>

View file

@ -160,7 +160,7 @@ export function updateCollapsibleIsOpen(
} }
const defaultClashAPIConfig = { const defaultClashAPIConfig = {
baseURL: 'http://127.0.0.1:9090', baseURL: document.getElementById('app')?.getAttribute('data-base-url') ?? 'http://127.0.0.1:9090',
secret: '', secret: '',
addedAt: 0, addedAt: 0,
}; };