feat(api-key): Add api-key authentication to middleware (#6521)

Also did a bit of a cleanup on the auth middleware. There should be no behavioral changes, just moved code around.
This commit is contained in:
Stevche Radevski
2024-02-27 13:44:37 +00:00
committed by GitHub
parent 3ee0f599c1
commit 753bd93ba1
3 changed files with 210 additions and 48 deletions
@@ -15,7 +15,7 @@ export const adminRegionRoutesMiddlewares: MiddlewareRoute[] = [
{
method: ["ALL"],
matcher: "/admin/regions*",
middlewares: [authenticate("admin", ["bearer", "session"])],
middlewares: [authenticate("admin", ["bearer", "session", "api-key"])],
},
{
method: ["GET"],