Refactor: auth architecture (#7256)

This commit is contained in:
shamoon
2026-10-16 22:09:09 -07:00
committed by GitHub
parent 89b0d20655
commit 9628256887
48 changed files with 638 additions and 127 deletions
+5 -1
View File
@@ -2,6 +2,8 @@ import { getSettings } from "../../../utils/config/config";
import createLogger from "../../../utils/logger";
import { httpProxy } from "../../../utils/proxy/http";
import { withAuth } from "utils/auth";
const logger = createLogger("longhorn");
function parseLonghornData(data) {
@@ -47,7 +49,7 @@ function parseLonghornData(data) {
return nodes;
}
export default async function handler(req, res) {
async function handler(req, res) {
const settings = getSettings();
const longhornSettings = settings?.providers?.longhorn || {};
const { url, username, password } = longhornSettings;
@@ -85,3 +87,5 @@ export default async function handler(req, res) {
nodes,
});
}
export default withAuth(handler);