mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
Fix verification options in API
This commit is contained in:
parent
9eb4069253
commit
479b00fc8e
1 changed files with 8 additions and 1 deletions
|
@ -32,6 +32,7 @@ const { check, validationResult } = require('express-validator')
|
|||
const Ajv = require("ajv")
|
||||
const ajv = new Ajv({coerceTypes: true})
|
||||
const kx = require('../../server')
|
||||
require('dotenv').config()
|
||||
|
||||
const apiProfileSchema = {
|
||||
type: "object",
|
||||
|
@ -169,6 +170,12 @@ const apiProfileValidate = ajv.compile(apiProfileSchema)
|
|||
const doVerification = async (data) => {
|
||||
let promises = []
|
||||
let results = []
|
||||
let verificationOptions = {
|
||||
proxy: {
|
||||
hostname: process.env.PROXY_HOSTNAME,
|
||||
policy: (process.env.PROXY_HOSTNAME != "") ? 'adaptive' : 'never'
|
||||
}
|
||||
}
|
||||
|
||||
for (let iUser = 0; iUser < data.keyData.users.length; iUser++) {
|
||||
const user = data.keyData.users[iUser]
|
||||
|
@ -178,7 +185,7 @@ const doVerification = async (data) => {
|
|||
|
||||
promises.push(
|
||||
new Promise(async (resolve, reject) => {
|
||||
await claim.verify()
|
||||
await claim.verify(verificationOptions)
|
||||
results.push([iUser, iClaim, claim])
|
||||
resolve()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue