add login portal and traefik middleware auth for testing redirect login

This commit is contained in:
Milo Schwartz 2024-10-06 18:08:26 -04:00
parent e731fc52aa
commit 7c8bb45fb0
14 changed files with 285 additions and 130 deletions

View file

@ -1,5 +1,6 @@
import { Router } from "express";
import * as gerbil from "@server/routers/gerbil";
import * as badger from "@server/routers/badger";
import * as traefik from "@server/routers/traefik";
import HttpCode from "@server/types/HttpCode";
@ -14,10 +15,15 @@ internalRouter.get("/traefik-config", traefik.traefikConfigProvider);
// Gerbil routes
const gerbilRouter = Router();
internalRouter.use("/gerbil", gerbilRouter);
gerbilRouter.get("/get-config", gerbil.getConfig);
gerbilRouter.post("/receive-bandwidth", gerbil.receiveBandwidth);
internalRouter.use("/gerbil", gerbilRouter);
// Badger routes
const badgerRouter = Router();
internalRouter.use("/badger", badgerRouter);
internalRouter.get("/verify-user", badger.verifyUser)
export default internalRouter;