mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-23 05:22:18 +00:00
feat: add middlewares to domains
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user