mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
feat: add support for default ports on http(s) protocols
This commit is contained in:
@@ -39,7 +39,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const url = new URL(app.url);
|
const url = new URL(app.url);
|
||||||
const options = {
|
const options = {
|
||||||
host: url.hostname,
|
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,
|
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
|
||||||
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const url = new URL(app.url);
|
const url = new URL(app.url);
|
||||||
const options = {
|
const options = {
|
||||||
host: url.hostname,
|
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,
|
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
|
||||||
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const url = new URL(app.url);
|
const url = new URL(app.url);
|
||||||
const options = {
|
const options = {
|
||||||
host: url.hostname,
|
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,
|
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
|
||||||
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const url = new URL(app.url);
|
const url = new URL(app.url);
|
||||||
const options = {
|
const options = {
|
||||||
host: url.hostname,
|
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,
|
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
|
||||||
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
const url = new URL(app.url);
|
const url = new URL(app.url);
|
||||||
const options = {
|
const options = {
|
||||||
host: url.hostname,
|
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,
|
login: app.integration.properties.find((x) => x.field === 'username')?.value ?? undefined,
|
||||||
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
hash: app.integration.properties.find((x) => x.field === 'password')?.value ?? undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user