support self hosted microsoft

This commit is contained in:
Quan HL
2023-08-09 17:56:38 +07:00
parent d07344ba3b
commit 7a91876cd7
2 changed files with 19 additions and 4 deletions
+7 -1
View File
@@ -106,6 +106,11 @@ const createRivaClient = async(rivaUri) => {
return client;
};
const isValidHttpOrWsUrl = (url) => {
const pattern = new RegExp('^(https?:\/\/|wss?:\/\/)');
return !!url.match(pattern);
}
module.exports = {
makeSynthKey,
@@ -117,5 +122,6 @@ module.exports = {
createRivaClient,
makeBasicAuthHeader,
NUANCE_AUTH_ENDPOINT,
noopLogger
noopLogger,
isValidHttpOrWsUrl
};