feat: add support for default ports on http(s) protocols

This commit is contained in:
Ezbon Jacob
2023-01-24 18:04:09 -06:00
committed by Manuel
parent 79906b4e15
commit 2c2f3ea5f4
5 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
const url = new URL(app.url);
const options = {
host: url.hostname,
port: url.port,
port: url.port || (url.protocol === 'https:' ? '443' : '80'),
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
};