Revert "Infer unifi port"

This commit is contained in:
Michael Shamoon 2022-10-09 09:17:50 -07:00
parent 69c9a449b1
commit 86b12debc5
2 changed files with 1 additions and 8 deletions

View File

@ -82,13 +82,6 @@ export default async function unifiProxyHandler(req, res) {
widget.prefix = prefix;
if (!widget.port) {
widget.port = 8443;
if (widget.prefix == udmpPrefix) {
widget.port = 443
}
}
const { endpoint } = req.query;
const url = new URL(formatApiCall(api, { endpoint, ...widget }));
const params = { method: "GET", headers: {} };

View File

@ -1,7 +1,7 @@
import unifiProxyHandler from "./proxy";
const widget = {
api: "{url}:{port}{prefix}/api/{endpoint}",
api: "{url}{prefix}/api/{endpoint}",
proxyHandler: unifiProxyHandler,
mappings: {