Rename to torAllowed
This commit is contained in:
parent
6432ea7b44
commit
667cde6042
|
@ -175,7 +175,7 @@ function generateSchema (wallet, { me }) {
|
||||||
: validator
|
: validator
|
||||||
.url()
|
.url()
|
||||||
.test(async (url, context) => {
|
.test(async (url, context) => {
|
||||||
if (field.validate.onionAllowed && TOR_REGEXP.test(url)) {
|
if (field.validate.torAllowed && TOR_REGEXP.test(url)) {
|
||||||
// allow HTTP and HTTPS over Tor
|
// allow HTTP and HTTPS over Tor
|
||||||
if (!/^https?:\/\//.test(url)) {
|
if (!/^https?:\/\//.test(url)) {
|
||||||
return context.createError({ message: 'http or https required' })
|
return context.createError({ message: 'http or https required' })
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const fields = [
|
||||||
type: 'text',
|
type: 'text',
|
||||||
validate: {
|
validate: {
|
||||||
type: 'url',
|
type: 'url',
|
||||||
onionAllowed: true
|
torAllowed: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue