@@ -625,6 +625,7 @@ pub struct FileClusterFrontendConfig {
625625 #[ serde( default ) ]
626626 pub position : RulePosition ,
627627 pub tags : Option < BTreeMap < String , String > > ,
628+ pub required_auth : Option < bool > ,
628629 pub redirect : Option < RedirectPolicy > ,
629630 pub redirect_scheme : Option < RedirectScheme > ,
630631 pub redirect_template : Option < String > ,
@@ -716,6 +717,7 @@ impl FileClusterFrontendConfig {
716717 path,
717718 method : self . method . clone ( ) ,
718719 tags : self . tags . clone ( ) ,
720+ required_auth : self . required_auth . unwrap_or ( false ) ,
719721 redirect : self . redirect ,
720722 redirect_scheme : self . redirect_scheme ,
721723 redirect_template : self . redirect_template . clone ( ) ,
@@ -758,6 +760,8 @@ pub struct FileClusterConfig {
758760 pub load_metric : Option < LoadMetric > ,
759761 #[ serde( default ) ]
760762 pub answers : Option < BTreeMap < String , String > > ,
763+ #[ serde( default ) ]
764+ pub authorized_hashes : Vec < u64 > ,
761765}
762766
763767#[ derive( Debug , Clone , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
@@ -845,6 +849,7 @@ impl FileClusterConfig {
845849 load_balancing : self . load_balancing ,
846850 load_metric : self . load_metric ,
847851 answers : load_answers ( self . answers . as_ref ( ) ) ?,
852+ authorized_hashes : self . authorized_hashes ,
848853 } ) )
849854 }
850855 }
@@ -866,6 +871,7 @@ pub struct HttpFrontendConfig {
866871 #[ serde( default ) ]
867872 pub position : RulePosition ,
868873 pub tags : Option < BTreeMap < String , String > > ,
874+ pub required_auth : bool ,
869875 pub redirect : Option < RedirectPolicy > ,
870876 pub redirect_scheme : Option < RedirectScheme > ,
871877 pub redirect_template : Option < String > ,
@@ -909,6 +915,7 @@ impl HttpFrontendConfig {
909915 method : self . method . clone ( ) ,
910916 position : self . position . into ( ) ,
911917 tags,
918+ required_auth : Some ( self . required_auth ) ,
912919 redirect : self . redirect . map ( Into :: into) ,
913920 redirect_scheme : self . redirect_scheme . map ( Into :: into) ,
914921 redirect_template : self . redirect_template . clone ( ) ,
@@ -929,6 +936,7 @@ impl HttpFrontendConfig {
929936 method : self . method . clone ( ) ,
930937 position : self . position . into ( ) ,
931938 tags,
939+ required_auth : Some ( self . required_auth ) ,
932940 redirect : self . redirect . map ( Into :: into) ,
933941 redirect_scheme : self . redirect_scheme . map ( Into :: into) ,
934942 redirect_template : self . redirect_template . clone ( ) ,
@@ -956,6 +964,7 @@ pub struct HttpClusterConfig {
956964 pub load_balancing : LoadBalancingAlgorithms ,
957965 pub load_metric : Option < LoadMetric > ,
958966 pub answers : BTreeMap < String , String > ,
967+ pub authorized_hashes : Vec < u64 > ,
959968}
960969
961970impl HttpClusterConfig {
@@ -969,6 +978,7 @@ impl HttpClusterConfig {
969978 load_balancing: self . load_balancing as i32 ,
970979 load_metric: self . load_metric. map( |s| s as i32 ) ,
971980 answers: self . answers. clone( ) ,
981+ authorized_hashes: self . authorized_hashes. clone( ) ,
972982 } )
973983 . into( ) ] ;
974984
@@ -1029,6 +1039,7 @@ impl TcpClusterConfig {
10291039 load_balancing: self . load_balancing as i32 ,
10301040 load_metric: self . load_metric. map( |s| s as i32 ) ,
10311041 answers: Default :: default ( ) ,
1042+ authorized_hashes: Default :: default ( ) ,
10321043 } )
10331044 . into( ) ] ;
10341045
0 commit comments