Merge pull request #2 from w3irdrobot/trim-relay-input

Trim relay input before matching it against regex
This commit is contained in:
Jon Staab 2022-12-12 08:42:20 -08:00 committed by GitHub
commit b16d499581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@
const submit = e => {
e.preventDefault()
url = url.trim()
if (!url.match(/^wss?:\/\/[\w.:-]+$/)) {
return toast.show("error", 'That isn\'t a valid websocket url - relay urls should start with "wss://"')