feat: add multiple hosts rounting capabilities

This commit is contained in:
Jonas Kaninda
2024-11-10 07:56:46 +01:00
parent 7bb64497c2
commit bc057dd435
4 changed files with 14 additions and 8 deletions

View File

@@ -131,12 +131,14 @@ type MiddlewareName struct {
// Route defines gateway route
type Route struct {
// Path defines route path
Path string `yaml:"path"`
// Name defines route name
Name string `yaml:"name"`
//Host Domain/host based request routing
Host string `yaml:"host"`
// Path defines route path
Path string `yaml:"path"`
//Host string `yaml:"host"`
//Hosts Domains/hosts based request routing
Hosts []string `yaml:"hosts"`
// Rewrite rewrites route path to desired path
//
// E.g. /cart to / => It will rewrite /cart path to /