mirror of
https://github.com/defnull/fediwall.git
synced 2024-11-21 23:23:14 +01:00
Accept server domains with port
This commit is contained in:
parent
a266b3cbda
commit
4294f3a9a7
@ -19,7 +19,7 @@ const config = computed({
|
||||
|
||||
const formServers = computed({
|
||||
get: () => config.value.servers.join(" "),
|
||||
set: (value) => config.value.servers = (value || "").split(" ").filter(isServer),
|
||||
set: (value) => config.value.servers = (value || "").replace(/https?:\/\//ig, "").split(/[, ]+/).filter(isServer),
|
||||
});
|
||||
|
||||
const tagPattern = /#?([\p{Letter}\p{Number}\p{Mark}\p{Connector_Punctuation}_]+)/igu
|
||||
|
@ -210,7 +210,7 @@ export function isAccount(acc: string) {
|
||||
}
|
||||
|
||||
export function isServer(server: string) {
|
||||
return isString(server) && server.match(/^([a-z0-9.-]+\.[a-z]{2,})$/i)
|
||||
return isString(server) && server.match(/^([a-z0-9.-]+\.[a-z]{2,})(:[0-9]{1,5})?$/i)
|
||||
}
|
||||
|
||||
export function isLanguage(lang: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user