fix and add add config for cloudops

This commit is contained in:
程广 2023-12-18 14:11:06 +08:00
parent d180d65524
commit 4ce1a59d14
2 changed files with 23 additions and 12 deletions

View File

@ -37,21 +37,32 @@
]
},
"servers":[{
"port" : 8080,
"name":"demo",
"port": 8000,
"name": "cloudops",
"paths":[
{
"path": "/",
"root": "./public/",
"default": "index.html"
"upstreams": ["http://192.168.12.174:9880"],
"directives":["HostSchemas $target"]
},
{
"path": "/ws",
"upstreams":["http://localhost:3000"],
"pathrewrite": {
"replace": "/ws",
"with": "/"
}
"path" : "/ssologin",
"upstreams": ["http://192.168.12.174:9880"],
"directives":["HostSchemas $target"]
},
{
"path" : "/themes",
"upstreams": ["http://192.168.12.174:9880"],
"directives":["HostSchemas $target"]
},
{
"path" : "/thing",
"upstreams": ["http://192.168.12.174:9880"],
"directives":[
"HostSchemas $target",
"HeaderOrigin",
"RemoveCookie token"
]
}
]
}]

View File

@ -13,7 +13,7 @@ type HttpPath struct {
Root string `json:"root"`
Default string `json:"default"`
Upstreams []string `json:"upstreams"`
Directives string `json:"directives"`
Directives []string `json:"directives"`
}
type HeaderValueConst string