mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
fix: don't allow invalid url like 'http:127.0.0.1' (#766)
This commit is contained in:
parent
705893f015
commit
68b97a6753
@ -3,7 +3,7 @@ export const isSingBox = (version: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const transformEndpointURL = (url: string) =>
|
export const transformEndpointURL = (url: string) =>
|
||||||
/^https?/.test(url) ? url : `${window.location.protocol}//${url}`
|
/^https?:\/\//.test(url) ? url : `${window.location.protocol}//${url}`
|
||||||
|
|
||||||
export const useStringBooleanMap = () => {
|
export const useStringBooleanMap = () => {
|
||||||
const [map, setMap] = createSignal<Record<string, boolean>>({})
|
const [map, setMap] = createSignal<Record<string, boolean>>({})
|
||||||
|
Loading…
Reference in New Issue
Block a user