add Response.max_cookie_size config

This commit is contained in:
David Lord 2017-04-19 05:08:53 -07:00
parent 465b48ed4e
commit 1ed756a523
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
6 changed files with 65 additions and 5 deletions

View file

@ -85,7 +85,7 @@ Response Objects
----------------
.. autoclass:: flask.Response
:members: set_cookie, data, mimetype, is_json, get_json
:members: set_cookie, max_cookie_size, data, mimetype, is_json, get_json
.. attribute:: headers

View file

@ -343,6 +343,12 @@ The following configuration values are used internally by Flask:
Default: ``False``
.. py:data:: MAX_COOKIE_SIZE
Warn if cookie headers are larger than this many bytes. Defaults to
``4093``. Larger cookies may be silently ignored by browsers. Set to
``0`` to disable the warning.
.. versionadded:: 0.4
``LOGGER_NAME``
@ -381,6 +387,8 @@ The following configuration values are used internally by Flask:
Added :data:`SESSION_COOKIE_SAMESITE` to control the session
cookie's ``SameSite`` option.
Added :data:`MAX_COOKIE_SIZE` to control a warning from Werkzeug.
Configuring from Files
----------------------