refactor: update configuration init
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user