Enhance error handling in gateway and configuration
- Added `expose_upstream_errors` option to the configuration, allowing detailed error messages in JSON responses for 502 errors. - Implemented `writeBadGatewayJSON` function to streamline JSON error responses, including upstream error details when enabled. - Updated documentation to reflect changes in configuration and error handling behavior for improved diagnostics.
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
|
||||
listen: ":8080"
|
||||
|
||||
# Диагностика: при 502 от прокси в JSON добавляется error.detail с текстом ошибки RoundTrip (TLS, DNS, таймаут).
|
||||
# Включайте только во внутренней сети — строка может содержать хосты/порты upstream.
|
||||
# expose_upstream_errors: true
|
||||
|
||||
# If true, IP whitelist is not enforced (development only).
|
||||
allow_all: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user