Skip to content
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

Allow passthrough of upstream 500 responses for development environments #196

Open
simonmittag opened this issue Nov 11, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@simonmittag
Copy link
Owner

Is your feature request related to a problem? Please describe.
J8a hides HTTP response body of upstream 500 responses and replaces it with a standard "502 bad gateway" message. This currently cannot be disabled.

Describe the solution you'd like
Keep the 502 bad gateway response code, but add a config flag under "downstream". "detailedUpstream50x", which will include the raw upstream response. This should be a JSON property on the response and needs to be encoded.

{
"j8a":"Achuta!",
"ServerID":"f05917d6",
"Version":"v0.9.0",
"Code":502,
"Message":"bad gateway",
"UpResCode":"${insert upstream HTTP response code here }",
"UpResBody":"${insert upstream HTTP response body here }",
}

disable this setting by default, not recommended for production.
@simonmittag simonmittag added the enhancement New feature or request label Nov 11, 2021
@simonmittag simonmittag self-assigned this Nov 11, 2021
@simonmittag
Copy link
Owner Author

cc @petelah, @dave-sims

@petelah
Copy link

petelah commented Nov 11, 2021

@simonmittag great feature request! This will be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants