-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api-response): check response header format #7238
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
tokers
reviewed
Jun 13, 2022
@@ -43,7 +43,7 @@ In an unhealthy state, if the Upstream service responds with a status code from | |||
|-------------------------|----------------|----------|---------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |||
| break_response_code | integer | True | | [200, ..., 599] | HTTP error code to return when Upstream is unhealthy. | | |||
| break_response_body | string | False | | | Body of the response message to return when Upstream is unhealthy. | | |||
| break_response_headers | array[object] | False | | | Headers of the response message to return when Upstream is unhealthy. Can only be configured when the `break_response_body` attribute is configured. The values can contain Nginx variables. For example, `$remote_addr` and `$balancer_ip`. | | |||
| break_response_headers | array[object] | False | | [{"key":"header_name","value":"can contain Nginx $var"}] | Headers of the response message to return when Upstream is unhealthy. Can only be configured when the `break_response_body` attribute is configured. The values can contain Nginx variables. For example, `$remote_addr` and `$balancer_ip`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example value should be more intuitive. We may give some other examples that value
support literals, variables and even their combinations.
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
tzssangglass
approved these changes
Jun 13, 2022
bzp2010
approved these changes
Jun 13, 2022
tokers
approved these changes
Jun 14, 2022
hongbinhsu
pushed a commit
to fitphp/apix
that referenced
this pull request
Jun 16, 2022
* upstream/master: (46 commits) docs: fix err in batch-processor (apache#7259) docs(deployment): sync design to online docs (apache#7256) feat(deployment): add structure of traditional role (apache#7249) fix(benchmark): write worker_processes into config.yaml (apache#7250) docs: correct the repo url (apache#7253) feat: Add support for capturing OIDC refresh tokens (apache#7220) feat(ssl): support get upstream cert from ssl object (apache#7221) chore: validate etcd conf strictly (apache#7245) fix(api-response): check response header format (apache#7238) fix: duplicate X-Forwarded-Proto will be sent as string (apache#7229) fix: distinguish different upstreams even they have the same addr (apache#7213) docs: make company on README more preciser (apache#7230) test: remove unused required etcd (apache#7225) fix: add debug yaml validation (apache#7201) change: remove upstream.enable_websocket which is deprecated since 2020 (apache#7222) docs: add re case on response-rewrite plugin (apache#7197) docs: add API Gateway keyword and AWS graviton3. (apache#7217) fix(response-rewrite): schema format error (apache#7212) docs(proxy-rewrite): remove empty space (apache#7210) chore: require http_stub_status_module exists (apache#7208) ...
spacewander
added a commit
that referenced
this pull request
Jun 30, 2022
Liu-Junlin
pushed a commit
to Liu-Junlin/apisix
that referenced
this pull request
Nov 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: spacewander spacewanderlzx@gmail.com
Description
Fixes #7234
Checklist