Add text and json fallback error handlers (#1937)

* Add text and json fallback error handlers

* Add tests and auto-detect error fallback type
This commit is contained in:
Adam Hopkins
2020-09-30 15:11:27 +03:00
committed by GitHub
parent 0c4a9b1dce
commit 066df2c142
4 changed files with 397 additions and 97 deletions

View File

@@ -32,6 +32,7 @@ DEFAULT_CONFIG = {
"REAL_IP_HEADER": None,
"PROXIES_COUNT": None,
"FORWARDED_FOR_HEADER": "X-Forwarded-For",
"FALLBACK_ERROR_FORMAT": "html",
}