Skip to content

Commit

Permalink
test: extend APISIX generated headers check
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Jan 10, 2022
1 parent 9565348 commit beea582
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions t/plugin/forward-auth.t
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,17 @@ Location: http://example.com/auth
=== TEST 6: hit route (ignore client X-Forwarded-XXX headers)
=== TEST 6: hit route (check APISIX generated headers and ignore client headers)
--- request
GET /hello
--- more_headers
Authorization: 444
X-Forwarded-Host: apisix.apache.org
--- error_code: 403
--- response_body_like eval
qr/\"x-forwarded-host\":\"localhost\"/
--- response_body eval
qr/\"x-forwarded-proto\":\"http\"/ and qr/\"x-forwarded-method\":\"GET\"/ and
qr/\"x-forwarded-host\":\"localhost\"/ and qr/\"x-forwarded-uri\":\"\\\/hello\"/ and
qr/\"x-forwarded-for\":\"127.0.0.1\"/
--- response_body_unlike eval
qr/\"x-forwarded-host\":\"apisix.apache.org\"/
Expand Down

0 comments on commit beea582

Please sign in to comment.