@@ -129,7 +129,7 @@ message HttpListenerConfig {
129
129
required uint32 request_timeout = 10 [default = 10 ];
130
130
// wether the listener is actively listening on its socket
131
131
required bool active = 11 [default = false ];
132
- optional CustomHttpAnswers http_answers = 12 ;
132
+ map < string , string > answers = 13 ;
133
133
}
134
134
135
135
// details of an HTTPS listener
@@ -161,7 +161,7 @@ message HttpsListenerConfig {
161
161
// The tickets allow the client to resume a session. This protects the client
162
162
// agains session tracking. Defaults to 4.
163
163
required uint64 send_tls13_tickets = 20 ;
164
- optional CustomHttpAnswers http_answers = 21 ;
164
+ map < string , string > answers = 22 ;
165
165
}
166
166
167
167
// details of an TCP listener
@@ -179,31 +179,6 @@ message TcpListenerConfig {
179
179
required bool active = 7 [default = false ];
180
180
}
181
181
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
-
207
182
message ActivateListener {
208
183
required SocketAddress address = 1 ;
209
184
required ListenerType proxy = 2 ;
@@ -239,10 +214,9 @@ message ListenersList {
239
214
240
215
enum RedirectPolicy {
241
216
FORWARD = 0 ;
242
- FORCE_HTTPS = 1 ;
243
- TEMPORARY = 2 ;
244
- PERMANENT = 3 ;
245
- UNAUTHORIZED = 4 ;
217
+ TEMPORARY = 1 ;
218
+ PERMANENT = 2 ;
219
+ UNAUTHORIZED = 3 ;
246
220
}
247
221
248
222
enum RedirectScheme {
@@ -263,9 +237,10 @@ message RequestHttpFrontend {
263
237
map <string , string > tags = 7 ;
264
238
optional RedirectPolicy redirect = 8 ;
265
239
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 ;
269
244
}
270
245
271
246
message RequestTcpFrontend {
@@ -393,9 +368,9 @@ message Cluster {
393
368
required bool https_redirect = 3 ;
394
369
optional ProxyProtocolConfig proxy_protocol = 4 ;
395
370
required LoadBalancingAlgorithms load_balancing = 5 [default = ROUND_ROBIN ];
396
- optional string answer_503 = 6 ;
397
371
optional LoadMetric load_metric = 7 ;
398
372
optional uint32 https_redirect_port = 8 ;
373
+ map <string , string > answers = 9 ;
399
374
}
400
375
401
376
enum LoadBalancingAlgorithms {
0 commit comments