mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
config: support multiple destination addresses (#1789)
* config: support multiple destination addresses * use constructor for string slice * add docs * add test for multiple destinations * fix name
This commit is contained in:
parent
c6b6141d12
commit
a4c7381eba
22 changed files with 556 additions and 191 deletions
|
@ -400,7 +400,7 @@ type Route struct {
|
|||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
||||
To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
|
||||
To []string `protobuf:"bytes,3,rep,name=to,proto3" json:"to,omitempty"`
|
||||
Redirect *RouteRedirect `protobuf:"bytes,34,opt,name=redirect,proto3" json:"redirect,omitempty"`
|
||||
// Deprecated: Do not use.
|
||||
AllowedUsers []string `protobuf:"bytes,4,rep,name=allowed_users,json=allowedUsers,proto3" json:"allowed_users,omitempty"`
|
||||
|
@ -485,11 +485,11 @@ func (x *Route) GetFrom() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *Route) GetTo() string {
|
||||
func (x *Route) GetTo() []string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
}
|
||||
return ""
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Route) GetRedirect() *RouteRedirect {
|
||||
|
@ -1577,7 +1577,7 @@ var file_config_proto_rawDesc = []byte{
|
|||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69,
|
||||
0x72, 0x65, 0x63, 0x74, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6f, 0x6d,
|
||||
0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue