refactor: update configuration init

This commit is contained in:
2024-11-02 12:24:31 +01:00
committed by GitHub
parent a17f4193ac
commit 40d4c6115a

View File

@@ -265,9 +265,10 @@ func initConfig(configFile string) {
{ {
Name: "Public", Name: "Public",
Path: "/public", Path: "/public",
Destination: "http://localhost:80", Destination: "https://example.com",
Rewrite: "/healthz", Rewrite: "/",
HealthCheck: "", HealthCheck: "",
Middlewares: []string{"api-forbidden-paths"},
}, },
{ {
Name: "Basic auth", Name: "Basic auth",
@@ -287,7 +288,6 @@ func initConfig(configFile string) {
}, },
{ {
Name: "Hostname example", Name: "Hostname example",
Host: "example.com",
Path: "/", Path: "/",
Destination: "https://example.com", Destination: "https://example.com",
Rewrite: "/", Rewrite: "/",
@@ -300,13 +300,11 @@ func initConfig(configFile string) {
Name: "basic-auth", Name: "basic-auth",
Type: BasicAuth, Type: BasicAuth,
Paths: []string{ Paths: []string{
"/user", "/*",
"/admin",
"/account",
}, },
Rule: BasicRuleMiddleware{ Rule: BasicRuleMiddleware{
Username: "goma", Username: "admin",
Password: "goma", Password: "admin",
}, },
}, { }, {
Name: "jwt", Name: "jwt",