Add configuration for maximum size of inbound email request
Closes #13514
This commit is contained in:
1 parent
42fb22e164
commit
859b66c669
3 files changed
+16
-1
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Add configuration for maximum size of inbound email request
|
||||
|
||||
Version 7.2.0 - 2024-04-29
|
||||
--------------------------
|
||||
|
||||
@@ -24,3 +24,12 @@ The ``store_prefix`` contains the prefix to use with the :ref:`FileStore
|
||||
<trytond:ref-filestore>`.
|
||||
|
||||
The default value is: ``None``
|
||||
|
||||
.. _config-inboud_email.max_size:
|
||||
|
||||
``max_size``
|
||||
============
|
||||
|
||||
The maximum size in bytes of the inbound email request (zero means no limit).
|
||||
|
||||
The default value is: `trytond:config-request.max_size`
|
||||
@@ -3,13 +3,18 @@
|
||||
|
||||
import json
|
||||
|
||||
from trytond.config import config
|
||||
from trytond.protocols.wrappers import (
|
||||
HTTPStatus, Response, abort, with_pool, with_transaction)
|
||||
HTTPStatus, Response, abort, set_max_request_size, with_pool,
|
||||
with_transaction)
|
||||
from trytond.wsgi import app
|
||||
|
||||
|
||||
@app.route(
|
||||
'/<database_name>/inbound_email/inbox/<identifier>', methods={'POST'})
|
||||
@set_max_request_size(config.getint(
|
||||
'inbound_email', 'max_size',
|
||||
default=config.getint('request', 'max_size')))
|
||||
@with_pool
|
||||
@with_transaction()
|
||||
def inbound_email(request, pool, identifier):
|
||||
|
||||
Reference in new issue
Block a user