You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably only a question and so maybe wrong here?
I try to verify an input json (express post) and also verify a "known shared SECRET" in the same "is-my-json-valid" step. The "SECRET" is set in a global environment config object (read from file):
no matter how I try I was not able to get it working:
validatorOptions.formats.SECRET=/^hellomeraki$/// works but is static (has to edit source)validatorOptions.formats.SECRET=/^config.SECRET$/// no - var not replacedvalidatorOptions.formats.SECRET='/^'+config.SECRET+'$/'// no - replaced but now string so: validatorOptions.formats.SECRET = /^ + config.SECRET + $/ // no - var not replaced
So has anyone a hint ?
BTW: changing it in the INPUTDATASCHEMA to type:'string', enum:['hellomeraki'] is not really an option, than the "user" has to edit not only the config but also the schema file.
The text was updated successfully, but these errors were encountered:
This is probably only a question and so maybe wrong here?
I try to verify an input json (express post) and also verify a "known shared SECRET" in the same "is-my-json-valid" step. The "SECRET" is set in a global environment config object (read from file):
no matter how I try I was not able to get it working:
So has anyone a hint ?
BTW: changing it in the INPUTDATASCHEMA to type:'string', enum:['hellomeraki'] is not really an option, than the "user" has to edit not only the config but also the schema file.
The text was updated successfully, but these errors were encountered: