From 40d4c6115a7ff752b92961a5249c1b0fc97bc59a Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 2 Nov 2024 12:24:31 +0100 Subject: [PATCH] refactor: update configuration init --- pkg/config.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/config.go b/pkg/config.go index 6885149..380117e 100644 --- a/pkg/config.go +++ b/pkg/config.go @@ -265,9 +265,10 @@ func initConfig(configFile string) { { Name: "Public", Path: "/public", - Destination: "http://localhost:80", - Rewrite: "/healthz", + Destination: "https://example.com", + Rewrite: "/", HealthCheck: "", + Middlewares: []string{"api-forbidden-paths"}, }, { Name: "Basic auth", @@ -287,7 +288,6 @@ func initConfig(configFile string) { }, { Name: "Hostname example", - Host: "example.com", Path: "/", Destination: "https://example.com", Rewrite: "/", @@ -300,13 +300,11 @@ func initConfig(configFile string) { Name: "basic-auth", Type: BasicAuth, Paths: []string{ - "/user", - "/admin", - "/account", + "/*", }, Rule: BasicRuleMiddleware{ - Username: "goma", - Password: "goma", + Username: "admin", + Password: "admin", }, }, { Name: "jwt",