Skip to content

Commit

Permalink
reverseproxy: complete handle_response test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxatome committed Sep 19, 2020
1 parent 29d8f53 commit f4eace2
Showing 1 changed file with 44 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

reverse_proxy 127.0.0.1:65535 {
handle_response header X-Accel-Redirect {
respond "Header!"
respond "Header X-Accel-Redirect!"
}
handle_response header X-Another {
respond "Header X-Another!"
}
handle_response status 401 {
respond "Status!"
respond "Status 401!"
}
handle_response status 403 {
respond "Status 403!"
}
handle_response {
respond "Any!"
Expand Down Expand Up @@ -35,7 +41,24 @@ reverse_proxy 127.0.0.1:65535 {
{
"handle": [
{
"body": "Header!",
"body": "Header X-Accel-Redirect!",
"handler": "static_response"
}
]
}
]
},
{
"match": {
"headers": {
"X-Another": []
}
},
"routes": [
{
"handle": [
{
"body": "Header X-Another!",
"handler": "static_response"
}
]
Expand All @@ -52,7 +75,24 @@ reverse_proxy 127.0.0.1:65535 {
{
"handle": [
{
"body": "Status!",
"body": "Status 401!",
"handler": "static_response"
}
]
}
]
},
{
"match": {
"status_code": [
403
]
},
"routes": [
{
"handle": [
{
"body": "Status 403!",
"handler": "static_response"
}
]
Expand Down

0 comments on commit f4eace2

Please sign in to comment.