forked from orbit-oss/flask
Don't rely on X-Requested-With for pretty print json response (#2193)
* Don't rely on X-Requested-With for pretty print json response * Fix test cases for pretty print json patch * Fix gramma error in docs for pretty print json config * Add changelog for JSONIFY_PRETTYPRINT_REGULAR
This commit is contained in:
parent
f5adb61b28
commit
a7f1a21c12
6 changed files with 11 additions and 8 deletions
|
|
@ -248,7 +248,7 @@ def jsonify(*args, **kwargs):
|
|||
indent = None
|
||||
separators = (',', ':')
|
||||
|
||||
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] and not request.is_xhr:
|
||||
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] or current_app.debug:
|
||||
indent = 2
|
||||
separators = (', ', ': ')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue