feat: add middlewares to domains

This commit is contained in:
David Eiber
2026-01-01 16:18:40 +01:00
parent 9498fbeff3
commit ce5ad35981
11 changed files with 7267 additions and 2 deletions
+6 -1
View File
@@ -133,7 +133,7 @@ export const createRouterConfig = async (
}
if (entryPoint === "web" && https) {
routerConfig.middlewares = ["redirect-to-https"];
routerConfig.middlewares?.unshift("redirect-to-https");
}
if ((entryPoint === "websecure" && https) || !https) {
@@ -160,6 +160,11 @@ export const createRouterConfig = async (
}
routerConfig.middlewares?.push(middlewareName);
}
// custom middlewares from domain
if (domain.middlewares && domain.middlewares.length > 0) {
routerConfig.middlewares?.push(...domain.middlewares);
}
}
if (entryPoint === "websecure") {