diff options
Diffstat (limited to 'mu4web/main.py')
-rw-r--r-- | mu4web/main.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mu4web/main.py b/mu4web/main.py index ef7624a..f901aec 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -181,9 +181,7 @@ def response_for(id: str) -> str: headers[key.lower()] = value head = [] - # TODO Make the defalut set of headers configurable - for h in ['date', 'from', 'to', 'cc', 'bcc', 'subject', 'x-original-to', - 'in-reply-to', 'message-id']: + for h in app.config['MESSAGE_HEADERS']: if x := headers.get(h.lower()): head += [('dt', h.title()), ('dd', header_format(h.lower(), x))] @@ -339,8 +337,15 @@ app = Flask(__name__, instance_relative_config=True) # Default configuration values app.config.update( - DEFAULT_DIRECTION = 'falling', - DEFAULT_SORT_COLUMN = 'date', + DEFAULT_DIRECTION='falling', + DEFAULT_SORT_COLUMN='date', + MESSAGE_HEADERS=[ + 'from', + 'subject', + 'to', + 'cc', + 'date', + ] ) app.config.from_pyfile('settings.py') |