feat: added a login page with Authentik authentication
This commit is contained in:
@@ -3,6 +3,7 @@ import { Hono } from "hono";
|
||||
import { serveStatic } from "hono/bun";
|
||||
import { cors } from "hono/cors";
|
||||
import { logger } from "hono/logger";
|
||||
import {authConfig, authMiddleware, authRoutes} from './auth';
|
||||
import eks from "./routes/eks";
|
||||
import ec2 from "./routes/ec2";
|
||||
import secretsmanager from "./routes/secretsmanager";
|
||||
@@ -12,6 +13,7 @@ import mskConnect from "./routes/mskConnect";
|
||||
import ses from "./routes/ses";
|
||||
import elasticache from "./routes/elasticache";
|
||||
const app = new Hono();
|
||||
const authentication = authConfig();
|
||||
|
||||
// Secrets Manager and KMS crypto routes handle sensitive values with server-side
|
||||
// AWS credentials, so an unrestricted `cors()` would let any web page in the
|
||||
@@ -42,6 +44,8 @@ app.use(
|
||||
}),
|
||||
);
|
||||
app.use("*", logger());
|
||||
app.use("*", authMiddleware(authentication));
|
||||
app.use("*", authRoutes(authentication));
|
||||
|
||||
app.route("/api/eks", eks);
|
||||
app.route("/api/ec2", ec2);
|
||||
|
||||
Reference in New Issue
Block a user