@@ -129,7 +129,7 @@ message HttpListenerConfig {
129129 required uint32 request_timeout = 10 [default = 10 ];
130130 // wether the listener is actively listening on its socket
131131 required bool active = 11 [default = false ];
132- optional CustomHttpAnswers http_answers = 12 ;
132+ map < string , string > answers = 13 ;
133133}
134134
135135// details of an HTTPS listener
@@ -161,7 +161,7 @@ message HttpsListenerConfig {
161161 // The tickets allow the client to resume a session. This protects the client
162162 // agains session tracking. Defaults to 4.
163163 required uint64 send_tls13_tickets = 20 ;
164- optional CustomHttpAnswers http_answers = 21 ;
164+ map < string , string > answers = 22 ;
165165}
166166
167167// details of an TCP listener
@@ -179,31 +179,6 @@ message TcpListenerConfig {
179179 required bool active = 7 [default = false ];
180180}
181181
182- // custom HTTP answers, useful for 404, 503 pages
183- message CustomHttpAnswers {
184- // MovedPermanently
185- optional string answer_301 = 1 ;
186- // BadRequest
187- optional string answer_400 = 2 ;
188- // Unauthorized
189- optional string answer_401 = 3 ;
190- // NotFound
191- optional string answer_404 = 4 ;
192- // RequestTimeout
193- optional string answer_408 = 5 ;
194- // PayloadTooLarge
195- optional string answer_413 = 6 ;
196- // BadGateway
197- optional string answer_502 = 7 ;
198- // ServiceUnavailable
199- optional string answer_503 = 8 ;
200- // GatewayTimeout
201- optional string answer_504 = 9 ;
202- // InsufficientStorage
203- optional string answer_507 = 10 ;
204-
205- }
206-
207182message ActivateListener {
208183 required SocketAddress address = 1 ;
209184 required ListenerType proxy = 2 ;
@@ -239,10 +214,9 @@ message ListenersList {
239214
240215enum RedirectPolicy {
241216 FORWARD = 0 ;
242- FORCE_HTTPS = 1 ;
243- TEMPORARY = 2 ;
244- PERMANENT = 3 ;
245- UNAUTHORIZED = 4 ;
217+ TEMPORARY = 1 ;
218+ PERMANENT = 2 ;
219+ UNAUTHORIZED = 3 ;
246220}
247221
248222enum RedirectScheme {
@@ -263,9 +237,10 @@ message RequestHttpFrontend {
263237 map <string , string > tags = 7 ;
264238 optional RedirectPolicy redirect = 8 ;
265239 optional RedirectScheme redirect_scheme = 9 ;
266- optional string rewrite_host = 10 ;
267- optional string rewrite_path = 11 ;
268- optional uint32 rewrite_port = 12 ;
240+ optional string redirect_template = 10 ;
241+ optional string rewrite_host = 11 ;
242+ optional string rewrite_path = 12 ;
243+ optional uint32 rewrite_port = 13 ;
269244}
270245
271246message RequestTcpFrontend {
@@ -393,9 +368,9 @@ message Cluster {
393368 required bool https_redirect = 3 ;
394369 optional ProxyProtocolConfig proxy_protocol = 4 ;
395370 required LoadBalancingAlgorithms load_balancing = 5 [default = ROUND_ROBIN ];
396- optional string answer_503 = 6 ;
397371 optional LoadMetric load_metric = 7 ;
398372 optional uint32 https_redirect_port = 8 ;
373+ map <string , string > answers = 9 ;
399374}
400375
401376enum LoadBalancingAlgorithms {
0 commit comments