Refine subscription import and refresh flow
This commit is contained in:
@@ -61,6 +61,14 @@ export function subscriptionDomain(subscriptionHost) {
|
||||
}
|
||||
}
|
||||
|
||||
export function isSubscriptionUrlValid(value) {
|
||||
try {
|
||||
return ['http:', 'https:'].includes(new URL(String(value).trim()).protocol);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function localProxyUrls(port = 8082, host = '127.0.0.1') {
|
||||
const urlHost = host.includes(':') && !host.startsWith('[') ? `[${host}]` : host;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user