File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -420,3 +420,44 @@ GET /
420
420
[qr/^ \{\" host\" \:\" echo\"\} /]
421
421
--- no_error_log eval
422
422
[qr/\[error/, qr/GET \/ HTTP\/1.1\" 200/]
423
+
424
+ === TEST 11: Original request information can be retrieved correctly
425
+ --- configuration
426
+ {
427
+ " services" : [
428
+ {
429
+ " id" : 42 ,
430
+ " proxy" : {
431
+ " policy_chain" : [
432
+ {
433
+ " name" : " apicast.policy.logging" ,
434
+ " configuration" : {
435
+ " custom_logging" : " Status::{ { status }} { {service. id}} { {host}} { {original_request. host}} " ,
436
+ " enable_json_logs" : false
437
+ }
438
+ },
439
+ {
440
+ " name" : " apicast.policy.upstream" ,
441
+ " configuration" :
442
+ {
443
+ " rules" : [ { " regex" : " /" , " url" : " http://echo" } ]
444
+ }
445
+ }
446
+ ]
447
+ }
448
+ }
449
+ ]
450
+ }
451
+ --- upstream
452
+ location / {
453
+ content_by_lua_block {
454
+ ngx. say (' yay, api backend' );
455
+ }
456
+ }
457
+ --- request
458
+ GET /
459
+ --- error_code: 200
460
+ --- error_log eval
461
+ [qr/^Status\:\:200 42 echo localhost/]
462
+ --- no_error_log eval
463
+ [qr/\[error/, qr/GET \/ HTTP\/1.1\" 200/]
You can’t perform that action at this time.
0 commit comments