fix: update API URLs and improve error handling for SUB2API configuration
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
function normalizeSub2ApiUrl(rawUrl) {
|
||||
const input = (rawUrl || '').trim() || DEFAULT_SUB2API_URL;
|
||||
if (!input) return '';
|
||||
const withProtocol = /^https?:\/\//i.test(input) ? input : `https://${input}`;
|
||||
const parsed = new URL(withProtocol);
|
||||
if (!parsed.pathname || parsed.pathname === '/') {
|
||||
|
||||
Reference in New Issue
Block a user